home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / Documentation / Strings Component < prev    next >
MacBinary  |  1994-04-21  |  279.9 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Wed Apr 20 11:43:37 1994, modified Thu Apr 21 08:07:05 1994, creator 'HLX2', type 'ONLN', 267050 bytes "Strings Component" , at 0x413aa 19224 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 53 74 72 69 6e 67 | 73 20 43 6f 6d 70 6f 6e |..String|s Compon|
|00000010| 65 6e 74 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ent.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 04 13 2a 00 | 00 4b 18 a9 da fe 29 a9 |......*.|.K....).|
|00000060| dc 1c e9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1c 08 00 00 |........|........|
|00000080| 53 74 72 69 6e 67 73 20 | 63 6f 6d 70 6f 6e 65 6e |Strings |componen|
|00000090| 74 0d 0d 49 6e 74 72 6f | 64 75 63 74 69 6f 6e 0d |t..Intro|duction.|
|000000a0| 43 6c 61 73 73 65 73 20 | 69 6e 20 74 68 65 20 73 |Classes |in the s|
|000000b0| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|000000c0| 20 63 72 65 61 74 65 20 | 61 6e 64 20 64 65 6c 65 | create |and dele|
|000000d0| 74 65 20 73 74 72 69 6e | 67 73 20 6f 62 6a 65 63 |te strin|gs objec|
|000000e0| 74 73 2c 20 61 6e 64 20 | 77 72 69 74 65 2c 20 72 |ts, and |write, r|
|000000f0| 65 61 64 2c 20 6d 6f 64 | 69 66 79 2c 20 74 72 61 |ead, mod|ify, tra|
|00000100| 6e 73 6c 61 74 65 2c 20 | 61 6e 64 20 64 65 6c 65 |nslate, |and dele|
|00000110| 74 65 20 73 74 72 69 6e | 67 73 20 61 6e 64 20 74 |te strin|gs and t|
|00000120| 65 78 74 20 77 69 74 68 | 69 6e 20 74 68 6f 73 65 |ext with|in those|
|00000130| 20 6f 62 6a 65 63 74 73 | 2e 20 53 74 72 69 6e 67 | objects|. String|
|00000140| 73 20 6d 61 79 20 62 65 | 20 63 6f 6d 70 6f 73 65 |s may be| compose|
|00000150| 64 20 6f 66 20 41 53 43 | 49 49 2c 20 55 6e 69 63 |d of ASC|II, Unic|
|00000160| 6f 64 65 2c 20 6f 72 20 | 75 73 65 72 2d 64 65 66 |ode, or |user-def|
|00000170| 69 6e 65 64 20 63 68 61 | 72 61 63 74 65 72 20 73 |ined cha|racter s|
|00000180| 65 74 73 2e 0d 53 74 72 | 69 6e 67 73 20 4f 76 65 |ets..Str|ings Ove|
|00000190| 72 76 69 65 77 0d 54 68 | 65 20 73 74 72 69 6e 67 |rview.Th|e string|
|000001a0| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 20 69 6e 63 6c |s compon|ent incl|
|000001b0| 75 64 65 73 20 31 33 20 | 63 6c 61 73 73 65 73 20 |udes 13 |classes |
|000001c0| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 31 35 33 20 6d |containi|ng 153 m|
|000001d0| 65 74 68 6f 64 73 2e 20 | 43 6c 61 73 73 65 73 20 |ethods. |Classes |
|000001e0| 61 72 65 20 6c 6f 6f 73 | 65 6c 79 20 62 6f 75 6e |are loos|ely boun|
|000001f0| 64 20 74 6f 20 61 6c 6c | 6f 77 20 6f 74 68 65 72 |d to all|ow other|
|00000200| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 65 61 73 79 | compone|nts easy|
|00000210| 20 61 63 63 65 73 73 20 | 74 6f 20 74 68 65 69 72 | access |to their|
|00000220| 20 73 65 72 76 69 63 65 | 73 2e 20 54 68 69 73 20 | service|s. This |
|00000230| 73 65 63 74 69 6f 6e 20 | 64 65 73 63 72 69 62 65 |section |describe|
|00000240| 73 20 53 74 72 69 6e 67 | 73 20 43 6f 6d 70 6f 6e |s String|s Compon|
|00000250| 65 6e 74 20 64 65 73 69 | 67 6e 2c 20 6c 69 73 74 |ent desi|gn, list|
|00000260| 73 20 6d 61 6a 6f 72 20 | 66 65 61 74 75 72 65 73 |s major |features|
|00000270| 20 61 6e 64 20 64 65 66 | 69 6e 65 73 20 69 6d 70 | and def|ines imp|
|00000280| 6f 72 74 61 6e 74 20 62 | 61 73 65 20 63 6c 61 73 |ortant b|ase clas|
|00000290| 73 65 73 2e 20 0d 44 69 | 72 65 63 74 6f 72 79 0d |ses. .Di|rectory.|
|000002a0| 46 57 53 74 72 69 6e 67 | 0d 48 65 72 69 74 61 67 |FWString|.Heritag|
|000002b0| 65 0d 46 57 5f 43 44 79 | 6e 61 6d 69 63 53 74 72 |e.FW_CDy|namicStr|
|000002c0| 69 6e 67 09 31 33 0d 46 | 57 5f 43 4d 65 6d 6f 72 |ing.13.F|W_CMemor|
|000002d0| 79 52 65 61 64 65 72 09 | 31 37 0d 46 57 5f 43 4d |yReader.|17.FW_CM|
|000002e0| 65 6d 6f 72 79 57 72 69 | 74 65 72 09 32 31 0d 46 |emoryWri|ter.21.F|
|000002f0| 57 5f 43 4d 69 6e 69 6d | 61 6c 53 74 72 69 6e 67 |W_CMinim|alString|
|00000300| 54 6f 6f 6c 09 32 33 0d | 46 57 5f 43 53 74 72 69 |Tool.23.|FW_CStri|
|00000310| 6e 67 09 32 37 0d 46 57 | 5f 43 53 74 72 69 6e 67 |ng.27.FW|_CString|
|00000320| 41 72 63 68 69 76 65 72 | 09 33 35 0d 46 57 5f 43 |Archiver|.35.FW_C|
|00000330| 53 74 72 69 6e 67 52 65 | 61 64 65 72 09 33 37 0d |StringRe|ader.37.|
|00000340| 46 57 49 43 53 74 72 69 | 6e 67 54 6f 6f 6c 09 34 |FWICStri|ngTool.4|
|00000350| 31 0d 46 57 5f 43 53 74 | 72 69 6e 67 57 72 69 74 |1.FW_CSt|ringWrit|
|00000360| 65 72 09 34 39 0d 46 57 | 5f 43 54 65 78 74 52 65 |er.49.FW|_CTextRe|
|00000370| 61 64 65 72 09 35 31 0d | 46 57 5f 43 54 65 78 74 |ader.51.|FW_CText|
|00000380| 57 72 69 74 65 72 09 35 | 37 0d 46 57 5f 54 42 6f |Writer.5|7.FW_TBo|
|00000390| 75 6e 64 65 64 53 74 72 | 69 6e 67 09 36 31 0d 46 |undedStr|ing.61.F|
|000003a0| 57 5f 54 53 74 72 69 6e | 67 41 72 63 68 69 76 65 |W_TStrin|gArchive|
|000003b0| 72 09 36 35 0d 53 74 72 | 69 6e 67 73 20 63 6f 6d |r.65.Str|ings com|
|000003c0| 70 6f 6e 65 6e 74 20 63 | 6c 61 73 73 65 73 0d 53 |ponent c|lasses.S|
|000003d0| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|000003e0| 20 63 6c 61 73 73 65 73 | 20 64 65 73 63 65 6e 64 | classes| descend|
|000003f0| 20 66 72 6f 6d 20 74 68 | 65 20 66 6f 75 72 20 61 | from th|e four a|
|00000400| 62 73 74 72 61 63 74 20 | 62 61 73 65 20 63 6c 61 |bstract |base cla|
|00000410| 73 73 65 73 20 6c 69 73 | 74 65 64 20 62 65 6c 6f |sses lis|ted belo|
|00000420| 77 3a 0d 46 57 5f 43 53 | 74 72 69 6e 67 20 09 44 |w:.FW_CS|tring .D|
|00000430| 65 66 69 6e 65 73 20 61 | 6c 6c 20 73 74 72 69 6e |efines a|ll strin|
|00000440| 67 73 20 63 6c 61 73 73 | 65 73 2e 20 0d 46 57 5f |gs class|es. .FW_|
|00000450| 43 53 74 72 69 6e 67 54 | 6f 6f 6c 09 50 72 6f 76 |CStringT|ool.Prov|
|00000460| 69 64 65 73 20 73 65 61 | 72 63 68 69 6e 67 20 61 |ides sea|rching a|
|00000470| 6e 64 20 63 6f 6d 70 61 | 72 69 73 6f 6e 20 75 74 |nd compa|rison ut|
|00000480| 69 6c 69 74 69 65 73 20 | 74 68 61 74 20 63 61 6e |ilities |that can|
|00000490| 20 62 65 20 70 65 72 66 | 6f 72 6d 65 64 20 6f 6e | be perf|ormed on|
|000004a0| 20 73 74 72 69 6e 67 73 | 20 61 6e 64 20 74 65 78 | strings| and tex|
|000004b0| 74 2e 0d 46 57 5f 43 54 | 65 78 74 57 72 69 74 65 |t..FW_CT|extWrite|
|000004c0| 72 09 57 72 69 74 65 73 | 20 74 68 65 20 63 6f 6e |r.Writes| the con|
|000004d0| 74 65 6e 74 20 6f 66 20 | 74 65 78 74 20 64 61 74 |tent of |text dat|
|000004e0| 61 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 0d 46 |a struct|ures. .F|
|000004f0| 57 5f 43 54 65 78 74 52 | 65 61 64 65 72 09 52 65 |W_CTextR|eader.Re|
|00000500| 61 64 73 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 20 |ads the |content |
|00000510| 6f 66 20 74 65 78 74 20 | 64 61 74 61 20 73 74 72 |of text |data str|
|00000520| 75 63 74 75 72 65 73 2e | 20 0d 46 69 67 75 72 65 |uctures.| .Figure|
|00000530| 20 31 15 31 20 53 74 72 | 69 6e 67 73 20 63 6f 6d | 1.1 Str|ings com|
|00000540| 70 6f 6e 65 6e 74 20 63 | 6c 61 73 73 20 68 65 69 |ponent c|lass hei|
|00000550| 72 61 72 63 68 79 2e 0d | 0d 4f 74 68 65 72 20 53 |rarchy..|.Other S|
|00000560| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|00000570| 20 73 74 72 75 63 74 75 | 72 65 73 0d 54 68 65 20 | structu|res.The |
|00000580| 53 74 72 69 6e 67 73 20 | 63 6f 6d 70 6f 6e 65 6e |Strings |componen|
|00000590| 74 20 63 6f 6e 74 61 69 | 6e 73 20 4d 61 63 72 6f |t contai|ns Macro|
|000005a0| 73 2c 20 74 79 70 65 64 | 65 66 73 20 61 6e 64 20 |s, typed|efs and |
|000005b0| 67 6c 6f 62 61 6c 20 66 | 75 6e 63 74 69 6f 6e 73 |global f|unctions|
|000005c0| 20 75 73 65 64 20 74 6f | 20 64 65 66 69 6e 65 20 | used to| define |
|000005d0| 74 68 65 20 6e 61 74 69 | 76 65 20 63 68 61 72 61 |the nati|ve chara|
|000005e0| 63 74 65 72 20 73 65 74 | 2c 20 61 6e 64 20 74 6f |cter set|, and to|
|000005f0| 20 61 72 63 68 69 76 65 | 20 73 74 72 69 6e 67 73 | archive| strings|
|00000600| 20 6f 62 6a 65 63 74 73 | 2e 0d 53 74 72 69 6e 67 | objects|..String|
|00000610| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 20 74 79 70 65 |s compon|ent type|
|00000620| 64 65 66 73 0d 54 68 65 | 20 53 74 72 69 6e 67 73 |defs.The| Strings|
|00000630| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 63 6f 6e 74 61 | compone|nt conta|
|00000640| 69 6e 73 20 74 79 70 65 | 64 65 66 73 20 77 68 69 |ins type|defs whi|
|00000650| 63 68 20 73 70 65 63 69 | 61 6c 69 7a 65 20 74 68 |ch speci|alize th|
|00000660| 65 20 46 57 5f 54 42 6f | 75 6e 64 65 64 53 74 72 |e FW_TBo|undedStr|
|00000670| 69 6e 67 20 63 6c 61 73 | 73 20 74 65 6d 70 6c 61 |ing clas|s templa|
|00000680| 74 65 20 74 6f 20 63 72 | 65 61 74 65 20 62 6f 75 |te to cr|eate bou|
|00000690| 6e 64 65 64 20 73 74 72 | 69 6e 67 20 6f 62 6a 65 |nded str|ing obje|
|000006a0| 63 74 73 20 74 68 61 74 | 20 61 72 65 20 33 32 20 |cts that| are 32 |
|000006b0| 61 6e 64 20 32 35 35 20 | 63 68 61 72 61 63 74 65 |and 255 |characte|
|000006c0| 72 73 20 6c 6f 6e 67 20 | 72 65 73 70 65 63 74 69 |rs long |respecti|
|000006d0| 76 65 6c 79 2e 20 54 68 | 65 79 20 61 72 65 20 6c |vely. Th|ey are l|
|000006e0| 69 73 74 65 64 20 62 65 | 6c 6f 77 3a 0d 09 46 57 |isted be|low:..FW|
|000006f0| 5f 54 42 6f 75 6e 64 65 | 64 53 74 72 69 6e 67 3c |_TBounde|dString<|
|00000700| 33 32 3e 20 46 57 5f 43 | 53 74 72 69 6e 67 33 32 |32> FW_C|String32|
|00000710| 0d 09 46 57 5f 54 42 6f | 75 6e 64 65 64 53 74 72 |..FW_TBo|undedStr|
|00000720| 69 6e 67 3c 32 35 35 3e | 20 46 57 5f 43 53 74 72 |ing<255>| FW_CStr|
|00000730| 69 6e 67 32 35 35 0d 59 | 6f 75 20 6d 61 79 20 63 |ing255.Y|ou may c|
|00000740| 72 65 61 74 65 20 73 74 | 72 69 6e 67 73 20 6f 66 |reate st|rings of|
|00000750| 20 64 69 66 66 65 72 65 | 6e 74 20 6c 65 6e 67 74 | differe|nt lengt|
|00000760| 68 73 20 62 79 20 64 65 | 66 69 6e 69 6e 67 20 79 |hs by de|fining y|
|00000770| 6f 75 72 20 6f 77 6e 20 | 74 79 70 65 64 65 66 20 |our own |typedef |
|00000780| 73 70 65 63 69 66 79 69 | 6e 67 20 79 6f 75 72 20 |specifyi|ng your |
|00000790| 6f 77 6e 20 73 74 72 69 | 6e 67 20 6c 65 6e 67 74 |own stri|ng lengt|
|000007a0| 68 2c 20 61 6e 64 20 70 | 61 73 73 69 6e 67 20 69 |h, and p|assing i|
|000007b0| 74 20 74 6f 20 61 20 46 | 57 5f 54 42 6f 75 6e 64 |t to a F|W_TBound|
|000007c0| 65 64 53 74 72 69 6e 67 | 20 63 6c 61 73 73 20 74 |edString| class t|
|000007d0| 65 6d 70 6c 61 74 65 20 | 75 70 6f 6e 20 69 6e 73 |emplate |upon ins|
|000007e0| 74 61 6e 74 69 61 74 69 | 6f 6e 2e 20 54 68 65 20 |tantiati|on. The |
|000007f0| 74 79 70 65 64 65 66 20 | 62 65 6c 6f 77 20 63 72 |typedef |below cr|
|00000800| 65 61 74 65 73 20 61 20 | 74 79 70 65 64 65 66 20 |eates a |typedef |
|00000810| 74 68 61 74 20 73 70 65 | 63 69 61 6c 69 7a 65 73 |that spe|cializes|
|00000820| 20 74 68 65 20 74 65 6d | 70 6c 61 74 65 20 74 6f | the tem|plate to|
|00000830| 20 63 72 65 61 74 65 20 | 73 74 72 69 6e 67 73 20 | create |strings |
|00000840| 36 34 20 63 68 61 72 61 | 63 74 65 72 73 20 6c 6f |64 chara|cters lo|
|00000850| 6e 67 2c 20 77 68 65 72 | 65 20 74 68 65 20 63 68 |ng, wher|e the ch|
|00000860| 61 72 61 63 74 65 72 73 | 20 61 72 65 20 64 65 66 |aracters| are def|
|00000870| 69 6e 65 64 20 74 6f 20 | 62 65 20 69 6e 20 74 68 |ined to |be in th|
|00000880| 65 20 6e 61 74 69 76 65 | 20 63 68 61 72 61 63 74 |e native| charact|
|00000890| 65 72 20 73 65 74 3a 0d | 09 46 57 5f 54 42 6f 75 |er set:.|.FW_TBou|
|000008a0| 6e 64 65 64 53 74 72 69 | 6e 67 3c 36 34 3e 20 46 |ndedStri|ng<64> F|
|000008b0| 57 5f 43 53 74 72 69 6e | 67 36 34 0d 54 68 65 20 |W_CStrin|g64.The |
|000008c0| 46 57 43 68 61 72 61 63 | 2e 68 20 66 69 6c 65 20 |FWCharac|.h file |
|000008d0| 61 6c 73 6f 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |also con|tains th|
|000008e0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 74 79 70 65 |e follow|ing type|
|000008f0| 64 65 66 73 20 77 68 69 | 63 68 20 64 65 66 69 6e |defs whi|ch defin|
|00000900| 65 20 61 20 6e 61 74 69 | 76 65 20 63 68 61 72 61 |e a nati|ve chara|
|00000910| 63 74 65 72 20 73 65 74 | 3a 0d 54 68 65 20 66 6f |cter set|:.The fo|
|00000920| 6c 6c 6f 77 69 6e 67 20 | 74 79 70 65 64 65 66 73 |llowing |typedefs|
|00000930| 20 64 65 66 69 6e 65 20 | 74 68 65 20 6e 61 74 69 | define |the nati|
|00000940| 76 65 20 63 68 61 72 61 | 63 74 65 72 20 74 79 70 |ve chara|cter typ|
|00000950| 65 2c 20 64 65 70 65 6e | 64 69 6e 67 20 75 70 6f |e, depen|ding upo|
|00000960| 6e 20 79 6f 75 72 20 70 | 72 6f 6a 65 63 74 20 23 |n your p|roject #|
|00000970| 64 65 66 69 6e 65 20 73 | 74 61 74 65 6d 65 6e 74 |define s|tatement|
|00000980| 2e 20 0d 09 74 79 70 65 | 64 65 66 20 63 68 61 72 |. ..type|def char|
|00000990| 20 46 57 5f 43 68 61 72 | 3b 0d 09 74 79 70 65 64 | FW_Char|;..typed|
|000009a0| 65 66 20 73 68 6f 72 74 | 20 46 57 5f 43 68 61 72 |ef short| FW_Char|
|000009b0| 3b 0d 09 74 79 70 65 64 | 65 66 20 6c 6f 6e 67 20 |;..typed|ef long |
|000009c0| 46 57 5f 43 68 61 72 3b | 0d 54 68 65 20 66 6f 6c |FW_Char;|.The fol|
|000009d0| 6c 6f 77 69 6e 67 20 74 | 79 70 65 64 65 66 73 20 |lowing t|ypedefs |
|000009e0| 64 65 66 69 6e 65 20 77 | 68 65 6e 20 63 68 61 72 |define w|hen char|
|000009f0| 61 63 74 65 72 73 20 73 | 68 61 6c 6c 20 62 65 20 |acters s|hall be |
|00000a00| 73 70 65 63 69 66 69 65 | 64 20 61 6e 64 20 77 68 |specifie|d and wh|
|00000a10| 65 6e 20 62 79 74 65 73 | 20 73 68 61 6c 6c 20 62 |en bytes| shall b|
|00000a20| 65 20 73 70 65 63 69 66 | 69 65 64 20 64 75 72 69 |e specif|ied duri|
|00000a30| 6e 67 20 6f 62 6a 65 63 | 74 20 69 6e 73 74 61 6e |ng objec|t instan|
|00000a40| 74 69 61 74 69 6f 6e 2e | 0d 09 74 79 70 65 64 65 |tiation.|..typede|
|00000a50| 66 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |f unsign|ed char |
|00000a60| 09 46 57 5f 50 61 73 63 | 61 6c 43 68 61 72 3b 0d |.FW_Pasc|alChar;.|
|00000a70| 09 74 79 70 65 64 65 66 | 20 75 6e 73 69 67 6e 65 |.typedef| unsigne|
|00000a80| 64 20 63 68 61 72 20 46 | 57 5f 42 79 74 65 3b 0d |d char F|W_Byte;.|
|00000a90| 09 74 79 70 65 64 65 66 | 20 6c 6f 6e 67 20 46 57 |.typedef| long FW|
|00000aa0| 5f 43 68 61 72 61 63 74 | 65 72 43 6f 75 6e 74 3b |_Charact|erCount;|
|00000ab0| 0d 09 74 79 70 65 64 65 | 66 20 6c 6f 6e 67 20 46 |..typede|f long F|
|00000ac0| 57 5f 43 68 61 72 61 63 | 74 65 72 50 6f 73 69 74 |W_Charac|terPosit|
|00000ad0| 69 6f 6e 3b 0d 09 74 79 | 70 65 64 65 66 20 6c 6f |ion;..ty|pedef lo|
|00000ae0| 6e 67 20 46 57 5f 42 79 | 74 65 43 6f 75 6e 74 3b |ng FW_By|teCount;|
|00000af0| 0d 09 74 79 70 65 64 65 | 66 20 6c 6f 6e 67 20 46 |..typede|f long F|
|00000b00| 57 5f 42 79 74 65 50 6f | 73 69 74 69 6f 6e 3b 0d |W_BytePo|sition;.|
|00000b10| 47 6c 6f 62 61 6c 20 66 | 75 6e 63 74 69 6f 6e 73 |Global f|unctions|
|00000b20| 0d 54 68 65 20 53 74 72 | 69 6e 67 73 20 63 6f 6d |.The Str|ings com|
|00000b30| 70 6f 6e 65 6e 74 20 69 | 6e 63 6c 75 64 65 73 20 |ponent i|ncludes |
|00000b40| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 67 6c |the foll|owing gl|
|00000b50| 6f 62 61 6c 20 66 75 6e | 63 74 69 6f 6e 73 2c 20 |obal fun|ctions, |
|00000b60| 77 68 69 63 68 20 70 72 | 6f 76 69 64 65 20 62 61 |which pr|ovide ba|
|00000b70| 73 69 63 20 63 68 61 72 | 61 63 74 65 72 20 61 6e |sic char|acter an|
|00000b80| 64 20 73 74 72 69 6e 67 | 20 6d 61 6e 69 70 75 6c |d string| manipul|
|00000b90| 61 74 69 6f 6e 20 73 65 | 72 76 69 63 65 73 20 66 |ation se|rvices f|
|00000ba0| 6f 72 20 74 68 65 20 6e | 61 74 69 76 65 20 63 68 |or the n|ative ch|
|00000bb0| 61 72 61 63 74 65 72 20 | 73 65 74 2e 0d 0d 46 57 |aracter |set...FW|
|00000bc0| 5f 43 68 61 72 61 63 74 | 65 72 43 6f 75 6e 74 20 |_Charact|erCount |
|00000bd0| 46 57 5f 53 74 72 69 6e | 67 4c 65 6e 67 74 68 28 |FW_Strin|gLength(|
|00000be0| 0d 09 09 09 09 09 09 09 | 09 63 6f 6e 73 74 20 46 |........|.const F|
|00000bf0| 57 5f 43 68 61 72 20 2a | 20 73 74 72 69 6e 67 29 |W_Char *| string)|
|00000c00| 3b 0d 0d 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |;..This |function|
|00000c10| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 6c 65 6e | returns| the len|
|00000c20| 67 74 68 20 69 6e 20 63 | 68 61 72 61 63 74 65 72 |gth in c|haracter|
|00000c30| 73 20 6f 66 20 73 74 72 | 69 6e 67 2e 0d 0d 76 6f |s of str|ing...vo|
|00000c40| 69 64 20 46 57 5f 42 6c | 6f 63 6b 4d 6f 76 65 28 |id FW_Bl|ockMove(|
|00000c50| 63 6f 6e 73 74 20 46 57 | 5f 42 79 74 65 20 2a 73 |const FW|_Byte *s|
|00000c60| 6f 75 72 63 65 2c 0d 09 | 09 09 09 09 09 46 57 5f |ource,..|.....FW_|
|00000c70| 42 79 74 65 20 2a 64 65 | 73 74 69 6e 61 74 69 6f |Byte *de|stinatio|
|00000c80| 6e 2c 0d 09 09 09 09 09 | 09 46 57 5f 42 79 74 65 |n,......|.FW_Byte|
|00000c90| 43 6f 75 6e 74 20 6e 75 | 6d 62 65 72 42 79 74 65 |Count nu|mberByte|
|00000ca0| 73 29 3b 0d 0d 54 68 69 | 73 20 66 75 6e 63 74 69 |s);..Thi|s functi|
|00000cb0| 6f 6e 20 6d 6f 76 65 73 | 20 74 68 65 20 6e 75 6d |on moves| the num|
|00000cc0| 62 65 72 20 6f 66 20 62 | 79 74 65 73 20 73 70 65 |ber of b|ytes spe|
|00000cd0| 63 69 66 69 65 64 20 62 | 79 20 6e 75 6d 62 65 72 |cified b|y number|
|00000ce0| 42 79 74 65 73 20 66 72 | 6f 6d 20 2a 73 6f 75 72 |Bytes fr|om *sour|
|00000cf0| 63 65 20 74 6f 20 2a 64 | 65 73 74 69 6e 61 74 69 |ce to *d|estinati|
|00000d00| 6f 6e 2e 0d 0d 46 57 5f | 42 79 74 65 43 6f 75 6e |on...FW_|ByteCoun|
|00000d10| 74 20 46 57 5f 42 79 74 | 65 73 49 6e 53 74 72 69 |t FW_Byt|esInStri|
|00000d20| 6e 67 28 0d 09 09 09 09 | 09 09 09 63 6f 6e 73 74 |ng(.....|...const|
|00000d30| 20 76 6f 69 64 2a 20 73 | 74 72 69 6e 67 2c 0d 09 | void* s|tring,..|
|00000d40| 09 09 09 09 09 09 46 57 | 5f 43 68 61 72 61 63 74 |......FW|_Charact|
|00000d50| 65 72 43 6f 75 6e 74 20 | 6c 65 6e 67 74 68 29 3b |erCount |length);|
|00000d60| 0d 0d 52 65 74 75 72 6e | 73 20 6e 75 6d 62 65 72 |..Return|s number|
|00000d70| 20 6f 66 20 62 79 74 65 | 73 20 69 6e 20 73 74 72 | of byte|s in str|
|00000d80| 69 6e 67 2e 0d 46 6f 72 | 20 66 69 78 65 64 2d 77 |ing..For| fixed-w|
|00000d90| 69 64 74 68 20 63 68 61 | 72 61 63 74 65 72 20 73 |idth cha|racter s|
|00000da0| 65 74 73 2c 20 74 68 69 | 73 20 66 75 6e 63 74 69 |ets, thi|s functi|
|00000db0| 6f 6e 20 64 6f 65 73 20 | 6e 6f 74 20 65 78 61 6d |on does |not exam|
|00000dc0| 69 6e 65 20 74 68 65 20 | 73 74 72 69 6e 67 2c 20 |ine the |string, |
|00000dd0| 73 6f 20 69 74 20 69 73 | 20 76 65 72 79 20 66 61 |so it is| very fa|
|00000de0| 73 74 2e 20 46 6f 72 20 | 76 61 72 69 61 62 6c 65 |st. For |variable|
|00000df0| 2d 77 69 64 74 68 20 63 | 68 61 72 61 63 74 65 72 |-width c|haracter|
|00000e00| 20 73 65 74 73 2c 20 74 | 68 69 73 20 66 75 6e 63 | sets, t|his func|
|00000e10| 74 69 6f 6e 20 73 65 61 | 72 63 68 65 73 20 74 68 |tion sea|rches th|
|00000e20| 65 20 73 74 72 69 6e 67 | 2c 20 73 6f 20 69 74 20 |e string|, so it |
|00000e30| 6d 69 67 68 74 20 62 65 | 20 73 6c 6f 77 2e 0d 0d |might be| slow...|
|00000e40| 46 57 5f 42 79 74 65 2a | 20 46 57 5f 42 79 74 65 |FW_Byte*| FW_Byte|
|00000e50| 50 6f 73 69 74 69 6f 6e | 49 6e 53 74 72 69 6e 67 |Position|InString|
|00000e60| 28 0d 09 09 09 09 09 09 | 09 63 6f 6e 73 74 20 76 |(.......|.const v|
|00000e70| 6f 69 64 2a 20 73 74 72 | 69 6e 67 2c 0d 09 09 09 |oid* str|ing,....|
|00000e80| 09 09 09 09 46 57 5f 43 | 68 61 72 61 63 74 65 72 |....FW_C|haracter|
|00000e90| 43 6f 75 6e 74 20 70 6f | 73 69 74 69 6f 6e 29 3b |Count po|sition);|
|00000ea0| 0d 0d 52 65 74 75 72 6e | 73 20 61 20 70 6f 69 6e |..Return|s a poin|
|00000eb0| 74 65 72 20 74 6f 20 67 | 69 76 65 6e 20 63 68 61 |ter to g|iven cha|
|00000ec0| 72 61 63 74 65 72 20 69 | 6e 20 73 74 72 69 6e 67 |racter i|n string|
|00000ed0| 2e 20 49 74 20 75 73 65 | 73 20 46 57 5f 42 79 74 |. It use|s FW_Byt|
|00000ee0| 65 73 49 6e 53 74 72 69 | 6e 67 28 29 2e 0d 0d 46 |esInStri|ng()...F|
|00000ef0| 57 5f 43 68 61 72 61 63 | 74 65 72 43 6f 75 6e 74 |W_Charac|terCount|
|00000f00| 20 46 57 5f 43 68 61 72 | 61 63 74 65 72 73 49 6e | FW_Char|actersIn|
|00000f10| 42 6c 6f 63 6b 28 0d 09 | 09 09 09 09 09 09 63 6f |Block(..|......co|
|00000f20| 6e 73 74 20 76 6f 69 64 | 20 2a 62 6c 6f 63 6b 2c |nst void| *block,|
|00000f30| 0d 09 09 09 09 09 09 09 | 46 57 5f 42 79 74 65 43 |........|FW_ByteC|
|00000f40| 6f 75 6e 74 20 6c 65 6e | 67 74 68 29 3b 0d 0d 52 |ount len|gth);..R|
|00000f50| 65 74 75 72 6e 73 20 6e | 75 6d 62 65 72 20 6f 66 |eturns n|umber of|
|00000f60| 20 63 68 61 72 61 63 74 | 65 72 73 20 69 6e 20 62 | charact|ers in b|
|00000f70| 6c 6f 63 6b 20 6f 66 20 | 62 79 74 65 73 2e 0d 46 |lock of |bytes..F|
|00000f80| 6f 72 20 66 69 78 65 64 | 2d 77 69 64 74 68 20 63 |or fixed|-width c|
|00000f90| 68 61 72 61 63 74 65 72 | 20 73 65 74 73 2c 20 74 |haracter| sets, t|
|00000fa0| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 64 6f 65 |his func|tion doe|
|00000fb0| 73 20 6e 6f 74 20 65 78 | 61 6d 69 6e 65 20 74 68 |s not ex|amine th|
|00000fc0| 65 20 73 74 72 69 6e 67 | 2c 20 73 6f 20 69 74 20 |e string|, so it |
|00000fd0| 69 73 20 76 65 72 79 20 | 66 61 73 74 2e 20 46 6f |is very |fast. Fo|
|00000fe0| 72 20 76 61 72 69 61 62 | 6c 65 2d 77 69 64 74 68 |r variab|le-width|
|00000ff0| 20 63 68 61 72 61 63 74 | 65 72 20 73 65 74 73 2c | charact|er sets,|
|00001000| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 73 | this fu|nction s|
|00001010| 65 61 72 63 68 65 73 20 | 74 68 65 20 73 74 72 69 |earches |the stri|
|00001020| 6e 67 2c 20 73 6f 20 69 | 74 20 6d 69 67 68 74 20 |ng, so i|t might |
|00001030| 62 65 20 73 6c 6f 77 21 | 0d 0d 46 57 5f 42 79 74 |be slow!|..FW_Byt|
|00001040| 65 2a 20 46 57 5f 50 72 | 65 76 69 6f 75 73 43 68 |e* FW_Pr|eviousCh|
|00001050| 61 72 61 63 74 65 72 28 | 46 57 5f 42 79 74 65 2a |aracter(|FW_Byte*|
|00001060| 20 73 74 72 69 6e 67 2c | 20 46 57 5f 42 79 74 65 | string,| FW_Byte|
|00001070| 2a 20 63 75 72 72 65 6e | 74 2c 20 73 68 6f 72 74 |* curren|t, short|
|00001080| 20 64 65 6c 74 61 3d 31 | 29 3b 0d 0d 54 72 61 76 | delta=1|);..Trav|
|00001090| 65 72 73 65 73 20 62 61 | 63 6b 20 74 68 72 6f 75 |erses ba|ck throu|
|000010a0| 67 68 20 61 20 73 74 72 | 69 6e 67 2e 20 73 74 72 |gh a str|ing. str|
|000010b0| 69 6e 67 20 61 6e 64 20 | 63 75 72 72 65 6e 74 20 |ing and |current |
|000010c0| 6d 75 73 74 20 62 65 20 | 70 6f 69 6e 74 65 72 73 |must be |pointers|
|000010d0| 20 69 6e 74 6f 20 74 68 | 65 20 73 61 6d 65 20 73 | into th|e same s|
|000010e0| 74 72 69 6e 67 2c 20 65 | 61 63 68 20 70 6f 69 6e |tring, e|ach poin|
|000010f0| 74 69 6e 67 20 61 74 20 | 74 68 65 20 66 69 72 73 |ting at |the firs|
|00001100| 74 20 62 79 74 65 20 6f | 66 20 61 20 63 68 61 72 |t byte o|f a char|
|00001110| 61 63 74 65 72 2e 20 73 | 74 72 69 6e 67 20 6d 75 |acter. s|tring mu|
|00001120| 73 74 20 62 65 20 6c 65 | 73 73 20 74 68 61 6e 20 |st be le|ss than |
|00001130| 63 75 72 72 65 6e 74 2e | 20 54 68 65 20 66 75 6e |current.| The fun|
|00001140| 63 74 69 6f 6e 20 72 65 | 74 75 72 6e 73 20 61 20 |ction re|turns a |
|00001150| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 63 |pointer |to the c|
|00001160| 68 61 72 61 63 74 65 72 | 20 64 65 6c 74 61 20 70 |haracter| delta p|
|00001170| 6f 73 69 74 69 6f 6e 73 | 20 62 65 66 6f 72 65 20 |ositions| before |
|00001180| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 20 61 74 |the char|acter at|
|00001190| 20 63 75 72 72 65 6e 74 | 2c 20 69 2e 65 2e 20 63 | current|, i.e. c|
|000011a0| 75 72 72 65 6e 74 20 64 | 65 63 72 65 6d 65 6e 74 |urrent d|ecrement|
|000011b0| 65 64 20 62 79 20 74 68 | 65 20 6e 75 6d 62 65 72 |ed by th|e number|
|000011c0| 20 6f 66 20 62 79 74 65 | 73 20 69 6e 20 74 68 65 | of byte|s in the|
|000011d0| 20 64 65 6c 74 61 20 70 | 72 65 76 69 6f 75 73 20 | delta p|revious |
|000011e0| 63 68 61 72 61 63 74 65 | 72 73 2e 0d 0d 69 6e 6c |characte|rs...inl|
|000011f0| 69 6e 65 20 76 6f 69 64 | 20 46 57 5f 42 6c 6f 63 |ine void| FW_Bloc|
|00001200| 6b 4d 6f 76 65 28 63 6f | 6e 73 74 20 46 57 5f 42 |kMove(co|nst FW_B|
|00001210| 79 74 65 20 2a 73 6f 75 | 72 63 65 2c 20 46 57 5f |yte *sou|rce, FW_|
|00001220| 42 79 74 65 20 2a 64 65 | 73 74 69 6e 61 74 69 6f |Byte *de|stinatio|
|00001230| 6e 2c 20 46 57 5f 42 79 | 74 65 43 6f 75 6e 74 20 |n, FW_By|teCount |
|00001240| 6e 75 6d 62 65 72 49 74 | 65 6d 73 29 3b 0d 0d 4d |numberIt|ems);..M|
|00001250| 6f 76 65 73 20 61 20 62 | 6c 6f 63 6b 20 6f 66 20 |oves a b|lock of |
|00001260| 62 79 74 65 73 20 6f 66 | 20 6e 75 6d 62 65 72 49 |bytes of| numberI|
|00001270| 74 65 6d 73 20 73 69 7a | 65 20 66 72 6f 6d 20 2a |tems siz|e from *|
|00001280| 73 6f 75 72 63 65 20 74 | 6f 20 2a 64 65 73 74 69 |source t|o *desti|
|00001290| 6e 61 74 69 6f 6e 2e 0d | 0d 69 6e 6c 69 6e 65 20 |nation..|.inline |
|000012a0| 46 57 5f 42 79 74 65 43 | 6f 75 6e 74 20 46 57 5f |FW_ByteC|ount FW_|
|000012b0| 42 79 74 65 73 49 6e 53 | 74 72 69 6e 67 28 0d 09 |BytesInS|tring(..|
|000012c0| 63 6f 6e 73 74 20 76 6f | 69 64 2a 20 73 74 72 69 |const vo|id* stri|
|000012d0| 6e 67 2c 20 46 57 5f 43 | 68 61 72 61 63 74 65 72 |ng, FW_C|haracter|
|000012e0| 43 6f 75 6e 74 20 6c 65 | 6e 67 74 68 29 3b 0d 0d |Count le|ngth);..|
|000012f0| 52 65 74 75 72 6e 73 20 | 74 68 65 20 6e 75 6d 62 |Returns |the numb|
|00001300| 65 72 20 6f 66 20 62 79 | 74 65 73 20 69 6e 20 61 |er of by|tes in a|
|00001310| 20 73 74 72 69 6e 67 20 | 6f 66 20 61 6e 79 20 74 | string |of any t|
|00001320| 79 70 65 2e 0d 0d 0d 69 | 6e 6c 69 6e 65 20 46 57 |ype....i|nline FW|
|00001330| 5f 43 68 61 72 61 63 74 | 65 72 43 6f 75 6e 74 20 |_Charact|erCount |
|00001340| 46 57 5f 43 68 61 72 61 | 63 74 65 72 73 49 6e 42 |FW_Chara|ctersInB|
|00001350| 6c 6f 63 6b 28 0d 09 09 | 09 63 6f 6e 73 74 20 76 |lock(...|.const v|
|00001360| 6f 69 64 20 2a 62 6c 6f | 63 6b 2c 20 46 57 5f 42 |oid *blo|ck, FW_B|
|00001370| 79 74 65 43 6f 75 6e 74 | 20 6c 65 6e 67 74 68 29 |yteCount| length)|
|00001380| 3b 0d 0d 52 65 74 75 72 | 6e 73 20 74 68 65 20 6e |;..Retur|ns the n|
|00001390| 75 6d 62 65 72 20 6f 66 | 20 6e 61 74 69 76 65 20 |umber of| native |
|000013a0| 63 68 61 72 61 63 74 65 | 72 73 20 69 6e 20 61 20 |characte|rs in a |
|000013b0| 62 6c 6f 63 6b 20 6f 66 | 20 73 69 7a 65 20 6c 65 |block of| size le|
|000013c0| 6e 67 74 68 2e 0d 0d 69 | 6e 6c 69 6e 65 20 46 57 |ngth...i|nline FW|
|000013d0| 5f 42 79 74 65 2a 20 46 | 57 5f 50 72 65 76 69 6f |_Byte* F|W_Previo|
|000013e0| 75 73 43 68 61 72 61 63 | 74 65 72 28 0d 46 57 5f |usCharac|ter(.FW_|
|000013f0| 42 79 74 65 2a 20 73 74 | 72 69 6e 67 2c 20 46 57 |Byte* st|ring, FW|
|00001400| 5f 42 79 74 65 2a 20 63 | 75 72 72 65 6e 74 2c 20 |_Byte* c|urrent, |
|00001410| 73 68 6f 72 74 20 64 65 | 6c 74 61 29 3b 0d 0d 52 |short de|lta);..R|
|00001420| 65 74 75 72 6e 73 20 74 | 68 65 20 63 68 61 72 61 |eturns t|he chara|
|00001430| 63 74 65 72 20 70 6f 73 | 69 74 69 6f 6e 65 64 20 |cter pos|itioned |
|00001440| 64 65 6c 74 61 20 63 68 | 61 72 61 63 74 65 72 73 |delta ch|aracters|
|00001450| 20 62 65 66 6f 72 65 20 | 70 6f 73 69 74 69 6f 6e | before |position|
|00001460| 20 63 75 72 72 65 6e 74 | 20 69 6e 20 74 68 65 20 | current| in the |
|00001470| 73 74 72 69 6e 67 2e 0d | 0d 69 6e 6c 69 6e 65 20 |string..|.inline |
|00001480| 46 57 5f 42 79 74 65 2a | 20 46 57 5f 42 79 74 65 |FW_Byte*| FW_Byte|
|00001490| 50 6f 73 69 74 69 6f 6e | 49 6e 53 74 72 69 6e 67 |Position|InString|
|000014a0| 28 0d 63 6f 6e 73 74 20 | 76 6f 69 64 2a 20 73 74 |(.const |void* st|
|000014b0| 72 69 6e 67 2c 20 46 57 | 5f 43 68 61 72 61 63 74 |ring, FW|_Charact|
|000014c0| 65 72 43 6f 75 6e 74 20 | 70 6f 73 69 74 69 6f 6e |erCount |position|
|000014d0| 29 3b 0d 0d 53 74 72 69 | 6e 67 73 20 63 6f 6d 70 |);..Stri|ngs comp|
|000014e0| 6f 6e 65 6e 74 20 6d 61 | 63 72 6f 73 0d 46 57 53 |onent ma|cros.FWS|
|000014f0| 74 72 67 41 72 2e 68 20 | 75 73 65 73 20 74 68 65 |trgAr.h |uses the|
|00001500| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 61 63 72 6f | followi|ng macro|
|00001510| 73 2c 20 77 68 69 63 68 | 20 61 72 63 68 69 76 65 |s, which| archive|
|00001520| 20 73 74 72 69 6e 67 20 | 6f 62 6a 65 63 74 73 2e | string |objects.|
|00001530| 0d a5 09 46 57 5f 44 45 | 46 49 4e 45 5f 43 4c 41 |...FW_DE|FINE_CLA|
|00001540| 53 53 5f 4d 31 3c 74 65 | 6d 70 6c 61 74 65 20 6e |SS_M1<te|mplate n|
|00001550| 61 6d 65 20 66 6f 72 20 | 79 6f 75 72 20 74 79 70 |ame for |your typ|
|00001560| 65 64 65 66 20 63 6c 61 | 73 73 2c 20 46 57 5f 43 |edef cla|ss, FW_C|
|00001570| 53 74 72 69 6e 67 3e 3b | 0d 0d 54 68 69 73 20 6d |String>;|..This m|
|00001580| 61 63 72 6f 20 70 72 6f | 76 69 64 65 73 20 52 54 |acro pro|vides RT|
|00001590| 54 49 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 75 |TI infor|mation u|
|000015a0| 73 65 64 20 77 68 65 6e | 20 79 6f 75 20 61 72 63 |sed when| you arc|
|000015b0| 68 69 76 65 20 61 20 73 | 74 72 69 6e 67 73 20 6f |hive a s|trings o|
|000015c0| 62 6a 65 63 74 2e 0d a5 | 09 46 57 5f 52 45 47 49 |bject...|.FW_REGI|
|000015d0| 53 54 45 52 5f 41 52 43 | 48 49 56 45 5f 43 4c 41 |STER_ARC|HIVE_CLA|
|000015e0| 53 53 20 0d 28 59 6f 75 | 72 54 61 67 4e 61 6d 65 |SS .(You|rTagName|
|000015f0| 2c 20 59 6f 75 72 55 73 | 65 72 54 79 70 65 2c 20 |, YourUs|erType, |
|00001600| 0d 28 46 57 5f 54 53 74 | 72 69 6e 67 41 72 63 68 |.(FW_TSt|ringArch|
|00001610| 69 76 65 72 3c 59 6f 75 | 72 55 73 65 72 54 79 70 |iver<You|rUserTyp|
|00001620| 65 3e 3a 3a 52 65 61 64 | 20 28 46 57 5f 54 53 74 |e>::Read| (FW_TSt|
|00001630| 72 69 6e 67 41 72 63 68 | 69 76 65 72 3c 59 6f 75 |ringArch|iver<You|
|00001640| 72 55 73 65 72 54 79 70 | 65 3e 3a 3a 57 72 69 74 |rUserTyp|e>::Writ|
|00001650| 65 29 29 0d 0d 54 68 69 | 73 20 6d 61 63 72 6f 20 |e))..Thi|s macro |
|00001660| 72 65 67 69 73 74 65 72 | 73 20 79 6f 75 72 20 73 |register|s your s|
|00001670| 74 72 69 6e 67 73 20 6f | 62 6a 65 63 74 2c 20 74 |trings o|bject, t|
|00001680| 6f 67 65 74 68 65 72 20 | 77 69 74 68 20 69 74 73 |ogether |with its|
|00001690| 20 74 79 70 65 2c 20 61 | 6e 20 69 6e 70 75 74 20 | type, a|n input |
|000016a0| 66 75 6e 63 74 69 6f 6e | 2c 20 61 6e 64 20 61 6e |function|, and an|
|000016b0| 20 6f 75 74 70 75 74 20 | 66 75 6e 63 74 69 6f 6e | output |function|
|000016c0| 3b 20 77 69 74 68 20 74 | 68 65 20 61 72 63 68 69 |; with t|he archi|
|000016d0| 76 65 72 73 20 6f 62 6a | 65 63 74 20 72 65 67 69 |vers obj|ect regi|
|000016e0| 73 74 72 79 2e 0d 0d 41 | 20 73 74 72 69 6e 67 20 |stry...A| string |
|000016f0| 69 73 20 61 6c 77 61 79 | 73 20 61 20 64 79 6e 61 |is alway|s a dyna|
|00001700| 6d 69 63 20 6f 62 6a 65 | 63 74 2c 20 66 6f 72 20 |mic obje|ct, for |
|00001710| 61 72 63 68 69 76 69 6e | 67 20 70 75 72 70 6f 73 |archivin|g purpos|
|00001720| 65 73 2e 20 41 72 63 68 | 69 76 69 6e 67 20 61 20 |es. Arch|iving a |
|00001730| 64 79 6e 61 6d 69 63 20 | 6f 62 6a 65 63 74 20 72 |dynamic |object r|
|00001740| 65 71 75 69 72 65 73 20 | 79 6f 75 20 74 6f 20 72 |equires |you to r|
|00001750| 65 67 69 73 74 65 72 20 | 79 6f 75 72 20 6f 62 6a |egister |your obj|
|00001760| 65 63 74 20 69 6e 20 61 | 6e 20 61 72 63 68 69 76 |ect in a|n archiv|
|00001770| 65 20 72 65 67 69 73 74 | 72 79 2e 20 54 68 69 73 |e regist|ry. This|
|00001780| 20 6d 61 63 72 6f 20 70 | 65 72 66 6f 72 6d 73 20 | macro p|erforms |
|00001790| 74 68 61 74 20 74 61 73 | 6b 20 66 6f 72 20 79 6f |that tas|k for yo|
|000017a0| 75 2e 20 49 74 20 72 65 | 71 75 69 72 65 73 20 79 |u. It re|quires y|
|000017b0| 6f 75 20 74 6f 20 70 72 | 6f 76 69 64 65 20 74 68 |ou to pr|ovide th|
|000017c0| 65 20 6f 62 6a 65 63 74 | 20 74 79 70 65 20 6f 66 |e object| type of|
|000017d0| 20 74 68 65 20 73 74 72 | 69 6e 67 20 74 6f 20 62 | the str|ing to b|
|000017e0| 65 20 61 72 63 68 69 76 | 65 64 2c 20 61 6e 64 20 |e archiv|ed, and |
|000017f0| 74 6f 20 70 72 6f 76 69 | 64 65 20 74 68 65 20 6e |to provi|de the n|
|00001800| 61 6d 65 73 20 6f 66 20 | 69 6e 70 75 74 20 61 6e |ames of |input an|
|00001810| 64 20 6f 75 74 70 75 74 | 20 66 75 6e 63 74 69 6f |d output| functio|
|00001820| 6e 73 20 63 75 73 74 6f | 6d 69 7a 65 64 20 74 6f |ns custo|mized to|
|00001830| 20 68 61 6e 64 6c 65 20 | 6f 62 6a 65 63 74 73 20 | handle |objects |
|00001840| 6f 66 20 74 68 69 73 20 | 72 65 67 69 73 74 65 72 |of this |register|
|00001850| 65 64 20 74 79 70 65 2e | 0d 0d 46 6f 72 20 79 6f |ed type.|..For yo|
|00001860| 75 72 20 63 6f 6e 76 65 | 6e 69 65 6e 63 65 2c 20 |ur conve|nience, |
|00001870| 74 68 65 20 46 57 5f 54 | 53 74 72 69 6e 67 41 72 |the FW_T|StringAr|
|00001880| 63 68 69 76 65 72 20 73 | 74 61 74 69 63 20 63 6c |chiver s|tatic cl|
|00001890| 61 73 73 20 70 72 6f 76 | 69 64 65 73 20 69 6e 70 |ass prov|ides inp|
|000018a0| 75 74 20 61 6e 64 20 6f | 75 74 70 75 74 20 66 75 |ut and o|utput fu|
|000018b0| 6e 63 74 69 6f 6e 73 2c | 20 77 68 69 63 68 20 79 |nctions,| which y|
|000018c0| 6f 75 20 63 61 6e 20 73 | 70 65 63 69 61 6c 69 7a |ou can s|pecializ|
|000018d0| 65 20 74 6f 20 68 61 6e | 64 6c 65 20 73 74 72 69 |e to han|dle stri|
|000018e0| 6e 67 73 20 6f 62 6a 65 | 63 74 73 20 6f 66 20 79 |ngs obje|cts of y|
|000018f0| 6f 75 72 20 75 73 65 72 | 2d 74 79 70 65 2e 0d 53 |our user|-type..S|
|00001900| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|00001910| 20 63 6f 6e 63 65 70 74 | 73 0d 41 6e 20 6f 70 65 | concept|s.An ope|
|00001920| 72 61 74 69 6f 6e 20 77 | 69 74 68 69 6e 20 74 68 |ration w|ithin th|
|00001930| 65 20 53 74 72 69 6e 67 | 73 20 43 6f 6d 70 6f 6e |e String|s Compon|
|00001940| 65 6e 74 20 75 73 65 73 | 20 61 20 74 6f 6f 6c 20 |ent uses| a tool |
|00001950| 6f 70 65 72 61 74 69 6e | 67 20 74 68 72 6f 75 67 |operatin|g throug|
|00001960| 68 20 61 6e 20 69 74 65 | 72 61 74 6f 72 20 74 6f |h an ite|rator to|
|00001970| 20 61 63 74 20 75 70 6f | 6e 20 61 20 74 65 78 74 | act upo|n a text|
|00001980| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 2e | data st|ructure.|
|00001990| 0d 53 74 72 69 6e 67 20 | 43 6f 6d 70 6f 6e 65 6e |.String |Componen|
|000019a0| 74 20 63 6c 61 73 73 65 | 73 20 62 75 69 6c 64 20 |t classe|s build |
|000019b0| 74 65 78 74 20 73 65 72 | 76 69 63 65 73 20 77 68 |text ser|vices wh|
|000019c0| 69 63 68 20 66 69 74 20 | 74 68 65 20 66 6f 6c 6c |ich fit |the foll|
|000019d0| 6f 77 69 6e 67 20 6d 6f | 64 65 6c 3a 0d 09 31 2e |owing mo|del:..1.|
|000019e0| 09 54 65 78 74 20 64 61 | 74 61 20 73 74 72 75 63 |.Text da|ta struc|
|000019f0| 74 75 72 65 73 2e 0d 0d | 46 57 5f 43 53 74 72 69 |tures...|FW_CStri|
|00001a00| 6e 67 20 68 69 65 72 61 | 72 63 68 79 20 63 72 65 |ng hiera|rchy cre|
|00001a10| 61 74 65 73 20 74 65 78 | 74 20 64 61 74 61 20 73 |ates tex|t data s|
|00001a20| 74 72 75 63 74 75 72 65 | 73 2e 20 54 68 65 20 6f |tructure|s. The o|
|00001a30| 6e 6c 79 20 6b 69 6e 64 | 73 20 6f 66 20 74 65 78 |nly kind|s of tex|
|00001a40| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|00001a50| 73 20 70 72 6f 76 69 64 | 65 64 20 69 6e 20 74 68 |s provid|ed in th|
|00001a60| 69 73 20 63 6f 6d 70 6f | 6e 65 6e 74 20 61 72 65 |is compo|nent are|
|00001a70| 20 73 74 72 69 6e 67 73 | 2c 20 62 75 74 20 74 68 | strings|, but th|
|00001a80| 65 20 53 74 72 69 6e 67 | 73 20 43 6f 6d 70 6f 6e |e String|s Compon|
|00001a90| 65 6e 74 20 70 72 6f 76 | 69 64 65 73 20 73 65 76 |ent prov|ides sev|
|00001aa0| 65 72 61 6c 20 6f 74 68 | 65 72 20 69 6d 70 6c 65 |eral oth|er imple|
|00001ab0| 6d 65 6e 74 61 74 69 6f | 6e 73 20 74 68 61 74 20 |mentatio|ns that |
|00001ac0| 6f 66 66 65 72 20 64 69 | 66 66 65 72 65 6e 74 20 |offer di|fferent |
|00001ad0| 74 69 6d 65 2f 73 70 61 | 63 65 20 74 72 61 64 65 |time/spa|ce trade|
|00001ae0| 6f 66 66 73 2e 20 53 74 | 72 69 6e 67 20 69 74 65 |offs. St|ring ite|
|00001af0| 72 61 74 6f 72 73 20 61 | 63 63 65 73 73 20 74 65 |rators a|ccess te|
|00001b00| 78 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |xt data |structur|
|00001b10| 65 73 2e 0d 0d 54 68 65 | 20 53 74 72 69 6e 67 73 |es...The| Strings|
|00001b20| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 70 72 6f 76 69 | compone|nt provi|
|00001b30| 64 65 73 20 61 6e 20 61 | 62 73 74 72 61 63 74 69 |des an a|bstracti|
|00001b40| 6f 6e 20 66 6f 72 20 74 | 65 78 74 20 64 61 74 61 |on for t|ext data|
|00001b50| 20 73 74 72 75 63 74 75 | 72 65 73 20 61 6e 64 20 | structu|res and |
|00001b60| 61 6e 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |an imple|mentatio|
|00001b70| 6e 20 66 6f 72 20 73 74 | 72 69 6e 67 20 64 61 74 |n for st|ring dat|
|00001b80| 61 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 49 74 |a struct|ures. It|
|00001b90| 20 69 6e 63 6c 75 64 65 | 73 20 69 6d 70 6c 65 6d | include|s implem|
|00001ba0| 65 6e 74 61 74 69 6f 6e | 73 20 66 6f 72 20 73 74 |entation|s for st|
|00001bb0| 72 69 6e 67 20 69 74 65 | 72 61 74 6f 72 73 20 61 |ring ite|rators a|
|00001bc0| 6e 64 20 6d 65 6d 6f 72 | 79 20 69 74 65 72 61 74 |nd memor|y iterat|
|00001bd0| 6f 72 73 2e 20 41 62 73 | 74 72 61 63 74 20 62 61 |ors. Abs|tract ba|
|00001be0| 73 65 20 63 6c 61 73 73 | 65 73 20 61 72 65 20 70 |se class|es are p|
|00001bf0| 72 6f 76 69 64 65 64 20 | 66 6f 72 20 74 65 78 74 |rovided |for text|
|00001c00| 20 69 74 65 72 61 74 6f | 72 73 2e 0d 09 32 2e 09 | iterato|rs...2..|
|00001c10| 54 65 78 74 20 49 74 65 | 72 61 74 6f 72 73 2e 0d |Text Ite|rators..|
|00001c20| 0d 54 68 65 20 46 57 5f | 43 54 65 78 74 57 72 69 |.The FW_|CTextWri|
|00001c30| 74 65 72 20 61 6e 64 20 | 46 57 5f 43 54 65 78 74 |ter and |FW_CText|
|00001c40| 52 65 61 64 65 72 20 68 | 65 69 72 61 72 63 68 69 |Reader h|eirarchi|
|00001c50| 65 73 20 70 72 6f 76 69 | 64 65 20 54 65 78 74 20 |es provi|de Text |
|00001c60| 69 74 65 72 61 74 6f 72 | 73 20 77 68 69 63 68 20 |iterator|s which |
|00001c70| 61 63 63 65 73 73 20 63 | 68 61 72 61 63 74 65 72 |access c|haracter|
|00001c80| 73 20 69 6e 73 69 64 65 | 20 74 65 78 74 20 64 61 |s inside| text da|
|00001c90| 74 61 20 73 74 72 75 63 | 74 75 72 65 73 2e 20 54 |ta struc|tures. T|
|00001ca0| 68 65 79 20 70 72 6f 76 | 69 64 65 20 61 63 63 65 |hey prov|ide acce|
|00001cb0| 73 73 20 74 6f 20 64 61 | 74 61 20 73 74 72 75 63 |ss to da|ta struc|
|00001cc0| 74 75 72 65 73 2c 20 66 | 6f 72 20 74 6f 6f 6c 73 |tures, f|or tools|
|00001cd0| 20 72 65 73 69 64 69 6e | 67 20 69 6e 20 74 68 65 | residin|g in the|
|00001ce0| 20 46 57 5f 43 53 74 72 | 69 6e 67 54 6f 6f 6c 20 | FW_CStr|ingTool |
|00001cf0| 68 65 69 72 61 72 63 68 | 69 65 73 2e 20 0d 09 33 |heirarch|ies. ..3|
|00001d00| 2e 09 54 6f 6f 6c 73 2e | 0d 0d 54 68 65 20 46 57 |..Tools.|..The FW|
|00001d10| 5f 43 53 74 72 69 6e 67 | 20 61 6e 64 20 46 57 5f |_CString| and FW_|
|00001d20| 43 53 74 72 69 6e 67 54 | 6f 6f 6c 20 68 65 69 72 |CStringT|ool heir|
|00001d30| 61 72 63 68 69 65 73 20 | 70 72 6f 76 69 64 65 20 |archies |provide |
|00001d40| 74 68 65 20 74 6f 6f 6c | 73 20 77 68 69 63 68 20 |the tool|s which |
|00001d50| 6f 70 65 72 61 74 65 20 | 6f 6e 20 62 6f 74 68 20 |operate |on both |
|00001d60| 73 74 72 69 6e 67 20 61 | 6e 64 20 74 65 78 74 20 |string a|nd text |
|00001d70| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 2e |data str|uctures.|
|00001d80| 20 46 57 5f 43 53 74 72 | 69 6e 67 20 74 6f 6f 6c | FW_CStr|ing tool|
|00001d90| 73 20 6f 70 65 72 61 74 | 65 20 64 69 72 65 63 74 |s operat|e direct|
|00001da0| 6c 79 20 6f 6e 20 73 74 | 72 69 6e 67 20 6f 62 6a |ly on st|ring obj|
|00001db0| 65 63 74 73 20 61 6e 64 | 20 63 61 6c 6c 20 61 6e |ects and| call an|
|00001dc0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 69 74 65 | appropr|iate ite|
|00001dd0| 72 61 74 6f 72 20 69 6e | 74 65 72 66 61 63 65 20 |rator in|terface |
|00001de0| 74 6f 20 69 6e 64 65 78 | 20 74 68 72 6f 75 67 68 |to index| through|
|00001df0| 20 64 61 74 61 2e 20 0d | 0d 46 57 5f 43 53 74 72 | data. .|.FW_CStr|
|00001e00| 69 6e 67 54 6f 6f 6c 20 | 70 65 72 66 6f 72 6d 73 |ingTool |performs|
|00001e10| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 2c 20 73 65 61 | compari|son, sea|
|00001e20| 72 63 68 2c 20 61 6e 64 | 20 6f 74 68 65 72 20 73 |rch, and| other s|
|00001e30| 74 72 69 6e 67 20 6f 70 | 65 72 61 74 69 6f 6e 73 |tring op|erations|
|00001e40| 20 63 6f 6d 6d 6f 6e 6c | 79 20 66 6f 75 6e 64 20 | commonl|y found |
|00001e50| 69 6e 20 61 20 73 74 61 | 6e 64 61 72 64 20 43 20 |in a sta|ndard C |
|00001e60| 6c 69 62 72 61 72 79 2e | 0d 4e 61 74 69 76 65 20 |library.|.Native |
|00001e70| 43 68 61 72 61 63 74 65 | 72 20 73 65 74 73 0d 41 |Characte|r sets.A|
|00001e80| 20 6e 61 74 69 76 65 20 | 63 68 61 72 61 63 74 65 | native |characte|
|00001e90| 72 20 73 65 74 20 69 73 | 20 74 68 65 20 63 68 61 |r set is| the cha|
|00001ea0| 72 61 63 74 65 72 20 73 | 65 74 20 73 75 70 70 6f |racter s|et suppo|
|00001eb0| 72 74 65 64 20 62 79 20 | 74 68 65 20 6f 70 65 72 |rted by |the oper|
|00001ec0| 61 74 69 6e 67 20 73 79 | 73 74 65 6d 2e 20 4f 50 |ating sy|stem. OP|
|00001ed0| 46 20 64 65 66 69 6e 65 | 73 20 6e 61 74 69 76 65 |F define|s native|
|00001ee0| 20 43 68 61 72 61 63 74 | 65 72 20 73 65 74 73 20 | Charact|er sets |
|00001ef0| 75 73 69 6e 67 20 74 77 | 6f 20 70 61 72 61 6d 65 |using tw|o parame|
|00001f00| 74 65 72 73 3a 20 0d a5 | 09 4d 61 78 69 6d 75 6d |ters: ..|.Maximum|
|00001f10| 20 63 68 61 72 61 63 74 | 65 72 20 73 69 7a 65 2e | charact|er size.|
|00001f20| 0d a5 09 46 69 78 65 64 | 20 76 73 2e 20 76 61 72 |...Fixed| vs. var|
|00001f30| 69 61 62 6c 65 20 77 69 | 64 74 68 20 63 68 61 72 |iable wi|dth char|
|00001f40| 61 63 74 65 72 73 2e 20 | 20 0d 49 66 20 63 68 61 |acters. | .If cha|
|00001f50| 72 61 63 74 65 72 73 20 | 63 6f 6d 70 72 69 73 69 |racters |comprisi|
|00001f60| 6e 67 20 61 20 73 74 72 | 69 6e 67 20 61 72 65 20 |ng a str|ing are |
|00001f70| 6f 66 20 61 20 66 69 78 | 65 64 2d 77 69 64 74 68 |of a fix|ed-width|
|00001f80| 20 74 79 70 65 2c 20 74 | 68 65 6e 20 4f 50 46 20 | type, t|hen OPF |
|00001f90| 73 65 74 73 20 61 6c 6c | 20 63 68 61 72 61 63 74 |sets all| charact|
|00001fa0| 65 72 73 20 74 6f 20 74 | 68 65 20 6d 61 78 69 6d |ers to t|he maxim|
|00001fb0| 75 6d 20 63 68 61 72 61 | 63 74 65 72 20 73 69 7a |um chara|cter siz|
|00001fc0| 65 20 69 6e 20 77 69 64 | 74 68 2e 20 54 68 65 20 |e in wid|th. The |
|00001fd0| 73 74 72 69 6e 67 73 20 | 63 6f 6d 70 6f 6e 65 6e |strings |componen|
|00001fe0| 74 20 61 6c 73 6f 20 75 | 73 65 73 20 61 20 22 6d |t also u|ses a "m|
|00001ff0| 65 64 69 61 6e 22 20 63 | 68 61 72 61 63 74 65 72 |edian" c|haracter|
|00002000| 20 73 69 7a 65 20 76 61 | 6c 75 65 20 77 68 65 6e | size va|lue when|
|00002010| 20 64 65 61 6c 69 6e 67 | 20 77 69 74 68 20 76 61 | dealing| with va|
|00002020| 72 69 61 62 6c 65 2d 77 | 69 64 74 68 20 63 68 61 |riable-w|idth cha|
|00002030| 72 61 63 74 65 72 73 2e | 20 20 0d 49 6e 20 6d 6f |racters.| .In mo|
|00002040| 73 74 20 76 61 72 69 61 | 62 6c 65 2d 77 69 64 74 |st varia|ble-widt|
|00002050| 68 20 73 79 73 74 65 6d | 73 2c 20 74 68 65 20 6d |h system|s, the m|
|00002060| 65 64 69 61 6e 20 76 61 | 6c 75 65 20 65 71 75 61 |edian va|lue equa|
|00002070| 6c 73 20 74 77 6f 20 62 | 79 74 65 73 2e 20 20 4f |ls two b|ytes. O|
|00002080| 50 46 20 75 73 65 73 20 | 74 68 69 73 20 6d 65 64 |PF uses |this med|
|00002090| 69 61 6e 20 76 61 6c 75 | 65 20 74 6f 20 63 6f 6d |ian valu|e to com|
|000020a0| 70 75 74 65 20 74 68 65 | 20 63 61 70 61 63 69 74 |pute the| capacit|
|000020b0| 79 20 6f 66 20 61 20 62 | 6f 75 6e 64 65 64 20 73 |y of a b|ounded s|
|000020c0| 74 72 69 6e 67 20 66 72 | 6f 6d 20 74 68 65 20 74 |tring fr|om the t|
|000020d0| 65 6d 70 6c 61 74 65 20 | 63 61 70 61 63 69 74 79 |emplate |capacity|
|000020e0| 20 70 61 72 61 6d 65 74 | 65 72 2e 20 4e 6f 74 65 | paramet|er. Note|
|000020f0| 20 74 68 61 74 20 61 6c | 6c 20 73 74 72 69 6e 67 | that al|l string|
|00002100| 73 20 61 72 65 20 74 65 | 72 6d 69 6e 61 74 65 64 |s are te|rminated|
|00002110| 20 77 69 74 68 20 61 20 | 22 4e 55 4c 22 20 63 68 | with a |"NUL" ch|
|00002120| 61 72 61 63 74 65 72 2c | 20 77 68 69 63 68 20 69 |aracter,| which i|
|00002130| 73 20 46 57 5f 43 68 61 | 72 28 30 29 2e 20 54 68 |s FW_Cha|r(0). Th|
|00002140| 69 73 20 6d 61 79 20 67 | 65 6e 65 72 61 74 65 20 |is may g|enerate |
|00002150| 6d 6f 72 65 20 7a 65 72 | 6f 20 62 79 74 65 73 20 |more zer|o bytes |
|00002160| 74 68 61 6e 20 6e 65 63 | 65 73 73 61 72 79 20 69 |than nec|essary i|
|00002170| 6e 20 73 6f 6d 65 20 63 | 68 61 72 61 63 74 65 72 |n some c|haracter|
|00002180| 73 20 73 65 74 73 2c 20 | 62 75 74 20 69 74 27 73 |s sets, |but it's|
|00002190| 20 61 20 73 69 6d 70 6c | 65 20 61 6e 64 20 73 61 | a simpl|e and sa|
|000021a0| 66 65 20 72 75 6c 65 20 | 74 6f 20 66 6f 6c 6c 6f |fe rule |to follo|
|000021b0| 77 2e 0d 54 68 65 20 66 | 69 6c 65 20 46 57 43 68 |w..The f|ile FWCh|
|000021c0| 61 72 61 63 2e 68 20 64 | 65 66 69 6e 65 73 20 63 |arac.h d|efines c|
|000021d0| 68 61 72 61 63 74 65 72 | 73 20 75 73 65 64 20 69 |haracter|s used i|
|000021e0| 6e 20 4f 50 46 2e 20 0d | 41 72 63 68 69 76 65 72 |n OPF. .|Archiver|
|000021f0| 20 73 75 70 70 6f 72 74 | 0d 41 6c 6c 20 73 74 72 | support|.All str|
|00002200| 69 6e 67 73 20 6f 62 6a | 65 63 74 73 20 61 72 65 |ings obj|ects are|
|00002210| 20 64 79 6e 61 6d 69 63 | 20 61 72 63 68 69 76 65 | dynamic| archive|
|00002220| 72 20 6f 62 6a 65 63 74 | 73 2e 20 46 6f 72 20 63 |r object|s. For c|
|00002230| 6f 6e 76 65 6e 69 65 6e | 63 65 2c 20 74 68 65 20 |onvenien|ce, the |
|00002240| 73 74 72 69 6e 67 73 20 | 63 6f 6d 70 6f 6e 65 6e |strings |componen|
|00002250| 74 20 70 72 6f 76 69 64 | 65 73 20 74 68 65 20 46 |t provid|es the F|
|00002260| 57 5f 54 53 74 72 69 6e | 67 41 72 63 68 69 76 65 |W_TStrin|gArchive|
|00002270| 72 20 63 6c 61 73 73 2c | 20 77 68 69 63 68 20 69 |r class,| which i|
|00002280| 6e 63 6c 75 64 65 73 20 | 74 68 65 20 63 75 73 74 |ncludes |the cust|
|00002290| 6f 6d 69 7a 65 64 20 72 | 65 61 64 20 61 6e 64 20 |omized r|ead and |
|000022a0| 77 72 69 74 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |write fu|nctions |
|000022b0| 72 65 71 75 69 72 65 64 | 20 62 79 20 4f 50 46 20 |required| by OPF |
|000022c0| 64 79 6e 61 6d 69 63 20 | 61 72 63 68 69 76 65 72 |dynamic |archiver|
|000022d0| 20 6f 62 6a 65 63 74 73 | 2e 20 53 65 65 20 74 68 | objects|. See th|
|000022e0| 65 20 41 72 63 68 69 76 | 65 72 20 63 6f 6d 70 6f |e Archiv|er compo|
|000022f0| 6e 65 6e 74 20 66 6f 72 | 20 64 65 74 61 69 6c 73 |nent for| details|
|00002300| 2e 20 0d 54 65 6d 70 6c | 61 74 65 20 73 75 70 70 |. .Templ|ate supp|
|00002310| 6f 72 74 0d 54 68 65 20 | 73 74 72 69 6e 67 73 20 |ort.The |strings |
|00002320| 63 6f 6d 70 6f 6e 65 6e | 74 20 75 73 65 73 20 74 |componen|t uses t|
|00002330| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 74 77 6f |he follo|wing two|
|00002340| 20 63 6c 61 73 73 20 74 | 65 6d 70 6c 61 74 65 73 | class t|emplates|
|00002350| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 62 75 69 | in orde|r to bui|
|00002360| 6c 64 20 63 75 73 74 6f | 6d 69 7a 65 64 20 73 74 |ld custo|mized st|
|00002370| 72 69 6e 67 73 20 63 6f | 6d 70 6f 73 65 64 20 6f |rings co|mposed o|
|00002380| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 6f 66 20 |f charac|ters of |
|00002390| 79 6f 75 72 20 6f 77 6e | 20 75 73 65 72 20 74 79 |your own| user ty|
|000023a0| 70 65 2e 20 0d a5 09 46 | 57 5f 54 42 6f 75 6e 64 |pe. ...F|W_TBound|
|000023b0| 65 64 53 74 72 69 6e 67 | 20 69 73 20 61 20 63 6c |edString| is a cl|
|000023c0| 61 73 73 20 74 65 6d 70 | 6c 61 74 65 20 74 61 6b |ass temp|late tak|
|000023d0| 69 6e 67 20 61 20 64 65 | 66 69 6e 65 64 20 73 74 |ing a de|fined st|
|000023e0| 72 69 6e 67 20 6c 65 6e | 67 74 68 20 61 73 20 74 |ring len|gth as t|
|000023f0| 68 65 20 74 65 6d 70 6c | 61 74 65 20 70 61 72 61 |he templ|ate para|
|00002400| 6d 65 74 65 72 2e 20 49 | 6e 73 74 61 6e 74 69 61 |meter. I|nstantia|
|00002410| 74 69 6f 6e 73 20 6f 66 | 20 74 68 69 73 20 63 6c |tions of| this cl|
|00002420| 61 73 73 20 68 6f 6c 64 | 20 62 6f 75 6e 64 65 64 |ass hold| bounded|
|00002430| 20 73 74 72 69 6e 67 73 | 20 63 6f 6d 70 6f 73 65 | strings| compose|
|00002440| 64 20 6f 66 20 6e 61 74 | 69 76 65 20 63 68 61 72 |d of nat|ive char|
|00002450| 61 63 74 65 72 73 2c 20 | 6f 72 20 6f 66 20 79 6f |acters, |or of yo|
|00002460| 75 72 20 6f 77 6e 20 75 | 73 65 72 2d 64 65 66 69 |ur own u|ser-defi|
|00002470| 6e 65 64 20 74 79 70 65 | 2e 0d a5 09 46 57 5f 54 |ned type|....FW_T|
|00002480| 53 74 72 69 6e 67 41 72 | 63 68 69 76 65 72 20 69 |StringAr|chiver i|
|00002490| 73 20 61 20 73 74 61 74 | 69 63 20 63 6c 61 73 73 |s a stat|ic class|
|000024a0| 20 74 65 6d 70 6c 61 74 | 65 20 70 72 6f 76 69 64 | templat|e provid|
|000024b0| 69 6e 67 20 63 75 73 74 | 6f 6d 20 69 6e 70 75 74 |ing cust|om input|
|000024c0| 20 61 6e 64 20 6f 75 74 | 70 75 74 20 66 75 6e 63 | and out|put func|
|000024d0| 74 69 6f 6e 73 20 72 65 | 71 75 69 72 65 64 20 62 |tions re|quired b|
|000024e0| 79 20 74 68 65 20 46 57 | 5f 52 45 47 49 53 54 45 |y the FW|_REGISTE|
|000024f0| 52 5f 41 52 43 48 49 56 | 45 5f 43 4c 41 53 53 20 |R_ARCHIV|E_CLASS |
|00002500| 6d 61 63 72 6f 2e 20 54 | 68 65 73 65 20 66 75 6e |macro. T|hese fun|
|00002510| 63 74 69 6f 6e 73 20 70 | 61 72 61 6d 65 74 65 72 |ctions p|arameter|
|00002520| 69 7a 65 20 6f 6e 20 79 | 6f 75 72 20 73 74 72 69 |ize on y|our stri|
|00002530| 6e 67 73 20 6f 62 6a 65 | 63 74 20 74 79 70 65 2e |ngs obje|ct type.|
|00002540| 20 0d 53 74 72 69 6e 67 | 73 20 63 6f 6d 70 6f 6e | .String|s compon|
|00002550| 65 6e 74 20 64 65 73 69 | 67 6e 0d 54 68 65 20 53 |ent desi|gn.The S|
|00002560| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|00002570| 20 72 65 73 69 64 65 73 | 20 69 6e 20 74 68 65 20 | resides| in the |
|00002580| 4f 50 46 20 66 6f 75 6e | 64 61 74 69 6f 6e 20 6c |OPF foun|dation l|
|00002590| 61 79 65 72 2c 20 74 6f | 20 6d 61 6b 65 20 69 74 |ayer, to| make it|
|000025a0| 20 65 61 73 69 6c 79 20 | 61 63 63 65 73 73 69 62 | easily |accessib|
|000025b0| 6c 65 20 74 6f 20 61 6c | 6c 20 6f 74 68 65 72 20 |le to al|l other |
|000025c0| 46 57 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2e 20 49 |FW compo|nents. I|
|000025d0| 74 20 69 73 20 64 65 73 | 69 67 6e 65 64 20 74 6f |t is des|igned to|
|000025e0| 20 70 72 6f 76 69 64 65 | 20 61 20 73 69 6d 70 6c | provide| a simpl|
|000025f0| 69 66 69 65 64 20 69 6e | 74 65 72 66 61 63 65 20 |ified in|terface |
|00002600| 74 6f 20 73 74 72 69 6e | 67 73 20 6f 70 65 72 61 |to strin|gs opera|
|00002610| 74 69 6f 6e 73 2c 20 74 | 6f 20 70 72 6f 76 69 64 |tions, t|o provid|
|00002620| 65 20 61 20 63 6f 6e 73 | 69 73 74 65 6e 74 20 70 |e a cons|istent p|
|00002630| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 69 6e 74 65 72 |rogrammi|ng inter|
|00002640| 66 61 63 65 20 74 6f 20 | 61 6c 6c 20 46 57 20 63 |face to |all FW c|
|00002650| 6f 6d 70 6f 6e 65 6e 74 | 73 20 61 6e 64 20 74 6f |omponent|s and to|
|00002660| 20 73 75 70 70 6f 72 74 | 20 69 6e 74 65 72 6e 61 | support| interna|
|00002670| 74 69 6f 6e 61 6c 20 74 | 65 78 74 20 70 72 6f 63 |tional t|ext proc|
|00002680| 65 73 73 69 6e 67 2e 20 | 0d 41 64 64 69 74 69 6f |essing. |.Additio|
|00002690| 6e 61 6c 20 53 74 72 69 | 6e 67 73 20 63 6f 6d 70 |nal Stri|ngs comp|
|000026a0| 6f 6e 65 6e 74 20 69 6e | 74 65 72 66 61 63 65 73 |onent in|terfaces|
|000026b0| 0d 54 68 65 20 53 74 72 | 69 6e 67 73 20 63 6f 6d |.The Str|ings com|
|000026c0| 70 6f 6e 65 6e 74 20 69 | 73 20 64 65 73 69 67 6e |ponent i|s design|
|000026d0| 65 64 20 74 6f 20 62 65 | 20 61 20 73 65 6c 66 2d |ed to be| a self-|
|000026e0| 63 6f 6e 74 61 69 6e 65 | 64 20 63 6c 61 73 73 20 |containe|d class |
|000026f0| 63 6f 6c 6c 65 63 74 69 | 6f 6e 2e 20 0d 4d 6f 73 |collecti|on. .Mos|
|00002700| 74 20 4f 50 46 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |t OPF co|mponents|
|00002710| 20 6e 65 65 64 20 74 6f | 20 61 63 63 65 73 73 20 | need to| access |
|00002720| 63 6c 61 73 73 65 73 20 | 69 6e 20 74 68 65 20 53 |classes |in the S|
|00002730| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |trings c|omponent|
|00002740| 2e 20 46 6f 72 20 74 68 | 69 73 20 72 65 61 73 6f |. For th|is reaso|
|00002750| 6e 2c 20 74 68 65 20 53 | 74 72 69 6e 67 73 20 43 |n, the S|trings C|
|00002760| 6f 6d 70 6f 6e 65 6e 74 | 20 77 61 73 20 70 6c 61 |omponent| was pla|
|00002770| 63 65 64 20 69 6e 20 74 | 68 65 20 66 6f 75 6e 64 |ced in t|he found|
|00002780| 61 74 69 6f 6e 20 6c 61 | 79 65 72 2e 0d 43 6f 6d |ation la|yer..Com|
|00002790| 70 6f 6e 65 6e 74 20 64 | 65 70 65 6e 64 65 6e 63 |ponent d|ependenc|
|000027a0| 69 65 73 0d 54 68 65 20 | 53 74 72 69 6e 67 73 20 |ies.The |Strings |
|000027b0| 63 6f 6d 70 6f 6e 65 6e | 74 20 68 61 73 20 74 68 |componen|t has th|
|000027c0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 64 65 70 65 |e follow|ing depe|
|000027d0| 6e 64 65 6e 63 69 65 73 | 3a 0d a5 09 54 68 65 20 |ndencies|:...The |
|000027e0| 41 72 63 68 69 76 65 72 | 73 20 63 6f 6d 70 6f 6e |Archiver|s compon|
|000027f0| 65 6e 74 20 61 72 63 68 | 69 76 65 73 20 73 74 72 |ent arch|ives str|
|00002800| 69 6e 67 73 20 6f 62 6a | 65 63 74 73 2e 0d a5 09 |ings obj|ects....|
|00002810| 54 68 65 20 53 74 72 65 | 61 6d 73 20 63 6f 6d 70 |The Stre|ams comp|
|00002820| 6f 6e 65 6e 74 20 70 72 | 6f 76 69 64 65 73 20 49 |onent pr|ovides I|
|00002830| 2f 4f 20 73 65 72 76 69 | 63 65 73 2e 0d a5 09 54 |/O servi|ces....T|
|00002840| 68 65 20 74 61 73 6b 20 | 67 6c 6f 62 61 6c 73 20 |he task |globals |
|00002850| 20 61 6e 64 20 4f 50 46 | 20 65 78 63 65 70 74 69 | and OPF| excepti|
|00002860| 6f 6e 20 6c 69 62 72 61 | 72 79 20 63 6f 6d 70 6f |on libra|ry compo|
|00002870| 6e 65 6e 74 73 20 70 72 | 6f 76 69 64 65 20 65 78 |nents pr|ovide ex|
|00002880| 63 65 70 74 69 6f 6e 20 | 68 61 6e 64 6c 69 6e 67 |ception |handling|
|00002890| 20 61 6e 64 20 75 74 69 | 6c 69 74 69 65 73 20 73 | and uti|lities s|
|000028a0| 65 72 76 69 63 65 73 2e | 20 49 6e 20 62 6f 74 68 |ervices.| In both|
|000028b0| 20 63 61 73 65 73 2c 20 | 74 68 65 20 64 65 70 65 | cases, |the depe|
|000028c0| 6e 64 65 6e 63 69 65 73 | 20 61 72 65 20 73 6d 61 |ndencies| are sma|
|000028d0| 6c 6c 20 61 6e 64 20 6c | 6f 6f 73 65 6c 79 20 63 |ll and l|oosely c|
|000028e0| 6f 75 70 6c 65 64 2e 20 | 0d 55 73 69 6e 67 20 74 |oupled. |.Using t|
|000028f0| 68 65 20 53 74 72 69 6e | 67 73 20 43 6f 6d 70 6f |he Strin|gs Compo|
|00002900| 6e 65 6e 74 0d 43 6c 61 | 73 73 65 73 20 69 6e 20 |nent.Cla|sses in |
|00002910| 74 68 65 20 53 74 72 69 | 6e 67 73 20 63 6f 6d 70 |the Stri|ngs comp|
|00002920| 6f 6e 65 6e 74 20 64 65 | 66 69 6e 65 2c 20 63 72 |onent de|fine, cr|
|00002930| 65 61 74 65 2c 20 6d 61 | 6e 69 70 75 6c 61 74 65 |eate, ma|nipulate|
|00002940| 20 61 6e 64 20 64 65 73 | 74 72 6f 79 20 74 65 78 | and des|troy tex|
|00002950| 74 20 61 6e 64 20 73 74 | 72 69 6e 67 20 64 61 74 |t and st|ring dat|
|00002960| 61 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 46 6f |a struct|ures. Fo|
|00002970| 72 20 63 6f 6e 76 65 6e | 69 65 6e 63 65 2c 20 74 |r conven|ience, t|
|00002980| 68 65 20 53 74 72 69 6e | 67 73 20 63 6f 6d 70 6f |he Strin|gs compo|
|00002990| 6e 65 6e 74 20 70 72 6f | 76 69 64 65 73 20 74 79 |nent pro|vides ty|
|000029a0| 70 65 64 65 66 73 20 77 | 68 69 63 68 20 64 65 66 |pedefs w|hich def|
|000029b0| 69 6e 65 20 33 32 2d 62 | 69 74 20 61 6e 64 20 32 |ine 32-b|it and 2|
|000029c0| 35 35 2d 62 69 74 20 62 | 6f 75 6e 64 65 64 20 73 |55-bit b|ounded s|
|000029d0| 74 72 69 6e 67 73 20 63 | 6f 6d 70 6f 73 65 64 20 |trings c|omposed |
|000029e0| 6f 66 20 6e 61 74 69 76 | 65 20 63 68 61 72 61 63 |of nativ|e charac|
|000029f0| 74 65 72 73 2e 20 59 6f | 75 20 6d 61 79 20 61 6c |ters. Yo|u may al|
|00002a00| 73 6f 20 63 72 65 61 74 | 65 20 79 6f 75 72 20 6f |so creat|e your o|
|00002a10| 77 6e 20 63 75 73 74 6f | 6d 20 74 6f 6f 6c 73 2c |wn custo|m tools,|
|00002a20| 20 73 74 72 69 6e 67 20 | 73 69 7a 65 73 20 61 6e | string |sizes an|
|00002a30| 64 20 74 65 78 74 20 66 | 6f 72 6d 61 74 73 2e 0d |d text f|ormats..|
|00002a40| 49 6e 73 74 61 6e 74 69 | 61 74 69 6e 67 20 77 69 |Instanti|ating wi|
|00002a50| 74 68 69 6e 20 74 68 65 | 20 53 74 72 69 6e 67 73 |thin the| Strings|
|00002a60| 20 63 6f 6d 70 6f 6e 65 | 6e 74 0d 54 68 65 20 70 | compone|nt.The p|
|00002a70| 72 6f 74 6f 63 6f 6c 20 | 64 65 66 69 6e 65 64 20 |rotocol |defined |
|00002a80| 69 6e 20 74 68 65 20 62 | 61 73 65 20 63 6c 61 73 |in the b|ase clas|
|00002a90| 73 20 46 57 5f 43 53 74 | 72 69 6e 67 20 73 75 70 |s FW_CSt|ring sup|
|00002aa0| 70 6f 72 74 73 20 61 20 | 77 69 64 65 20 72 61 6e |ports a |wide ran|
|00002ab0| 67 65 20 6f 66 20 6f 70 | 65 72 61 74 69 6f 6e 73 |ge of op|erations|
|00002ac0| 20 6f 6e 20 73 74 72 69 | 6e 67 73 2c 20 62 75 74 | on stri|ngs, but|
|00002ad0| 20 73 6f 6d 65 20 6f 70 | 65 72 61 74 69 6f 6e 73 | some op|erations|
|00002ae0| 20 73 74 69 6c 6c 20 72 | 65 71 75 69 72 65 20 79 | still r|equire y|
|00002af0| 6f 75 20 74 6f 20 75 73 | 65 20 61 20 74 6f 6f 6c |ou to us|e a tool|
|00002b00| 20 61 6e 64 20 61 6e 20 | 69 74 65 72 61 74 6f 72 | and an |iterator|
|00002b10| 2e 20 4e 6f 74 65 20 74 | 68 61 74 20 73 6f 6d 65 |. Note t|hat some|
|00002b20| 20 46 57 5f 43 53 74 72 | 69 6e 67 20 6f 70 65 72 | FW_CStr|ing oper|
|00002b30| 61 74 69 6f 6e 73 20 64 | 65 6c 65 67 61 74 65 20 |ations d|elegate |
|00002b40| 74 68 65 20 6f 70 65 72 | 61 74 69 6f 6e 20 74 6f |the oper|ation to|
|00002b50| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 73 74 72 | the cur|rent str|
|00002b60| 69 6e 67 20 74 6f 6f 6c | 2e 0d 53 75 62 63 6c 61 |ing tool|..Subcla|
|00002b70| 73 73 69 6e 67 20 77 69 | 74 68 69 6e 20 74 68 65 |ssing wi|thin the|
|00002b80| 20 53 74 72 69 6e 67 73 | 20 43 6f 6d 70 6f 6e 65 | Strings| Compone|
|00002b90| 6e 74 0d 53 75 62 63 6c | 61 73 73 20 61 20 53 74 |nt.Subcl|ass a St|
|00002ba0| 72 69 6e 67 73 20 63 6c | 61 73 73 20 69 6e 20 6f |rings cl|ass in o|
|00002bb0| 72 64 65 72 20 74 6f 20 | 73 75 70 70 6f 72 74 20 |rder to |support |
|00002bc0| 79 6f 75 72 20 6f 77 6e | 20 20 66 6f 72 6d 61 74 |your own| format|
|00002bd0| 2c 20 6f 72 20 73 74 72 | 69 6e 67 20 73 69 7a 65 |, or str|ing size|
|00002be0| 2e 20 54 68 65 20 66 6f | 75 72 20 61 62 73 74 72 |. The fo|ur abstr|
|00002bf0| 61 63 74 20 62 61 73 65 | 20 63 6c 61 73 73 65 73 |act base| classes|
|00002c00| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00002c10| 69 73 20 73 65 63 74 69 | 6f 6e 20 61 72 65 20 61 |is secti|on are a|
|00002c20| 6c 6c 20 64 65 73 69 67 | 6e 65 64 20 74 6f 20 62 |ll desig|ned to b|
|00002c30| 65 20 73 75 62 63 6c 61 | 73 73 65 64 2e 0d 45 78 |e subcla|ssed..Ex|
|00002c40| 74 65 6e 64 69 6e 67 20 | 74 68 65 20 53 74 72 69 |tending |the Stri|
|00002c50| 6e 67 73 20 63 6f 6d 70 | 6f 6e 65 6e 74 0d 45 78 |ngs comp|onent.Ex|
|00002c60| 74 65 6e 64 20 74 68 65 | 20 73 74 72 69 6e 67 73 |tend the| strings|
|00002c70| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 69 6e 20 74 68 | compone|nt in th|
|00002c80| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 77 61 79 73 |e follow|ing ways|
|00002c90| 3a 0d 09 31 2e 09 41 64 | 64 20 6e 65 77 20 74 65 |:..1..Ad|d new te|
|00002ca0| 78 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |xt data |structur|
|00002cb0| 65 73 2e 20 46 6f 72 20 | 65 61 63 68 20 6e 65 77 |es. For |each new|
|00002cc0| 20 74 65 78 74 20 64 61 | 74 61 20 73 74 72 75 63 | text da|ta struc|
|00002cd0| 74 75 72 65 2c 20 77 72 | 69 74 65 20 61 20 73 65 |ture, wr|ite a se|
|00002ce0| 74 20 6f 66 20 69 74 65 | 72 61 74 6f 72 73 20 28 |t of ite|rators (|
|00002cf0| 69 2e 65 2e 20 73 75 62 | 63 6c 61 73 73 65 73 20 |i.e. sub|classes |
|00002d00| 6f 66 20 46 57 5f 54 65 | 78 74 52 65 61 64 65 72 |of FW_Te|xtReader|
|00002d10| 20 61 6e 64 20 46 57 5f | 54 65 78 74 57 72 69 74 | and FW_|TextWrit|
|00002d20| 65 72 29 2e 20 4e 6f 77 | 20 61 6c 6c 20 70 72 65 |er). Now| all pre|
|00002d30| 76 69 6f 75 73 6c 79 20 | 65 78 69 73 74 69 6e 67 |viously |existing|
|00002d40| 20 74 6f 6f 6c 73 20 63 | 61 6e 20 62 65 20 75 73 | tools c|an be us|
|00002d50| 65 64 20 6f 6e 20 74 68 | 65 20 6e 65 77 20 74 65 |ed on th|e new te|
|00002d60| 78 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |xt data |structur|
|00002d70| 65 73 2e 0d 09 32 2e 09 | 41 64 64 20 6e 65 77 20 |es...2..|Add new |
|00002d80| 74 6f 6f 6c 73 2e 20 57 | 68 65 6e 20 77 72 69 74 |tools. W|hen writ|
|00002d90| 69 6e 67 20 61 20 74 6f | 6f 6c 2c 20 6d 61 6b 65 |ing a to|ol, make|
|00002da0| 20 74 68 65 20 6d 65 6d | 62 65 72 20 66 75 6e 63 | the mem|ber func|
|00002db0| 74 69 6f 6e 73 20 6f 66 | 20 74 68 65 20 74 6f 6f |tions of| the too|
|00002dc0| 6c 20 75 73 65 20 69 74 | 65 72 61 74 6f 72 20 69 |l use it|erator i|
|00002dd0| 6e 74 65 72 66 61 63 65 | 73 2e 20 54 68 65 6e 20 |nterface|s. Then |
|00002de0| 79 6f 75 72 20 74 6f 6f | 6c 20 63 61 6e 20 62 65 |your too|l can be|
|00002df0| 20 75 73 65 64 20 6f 6e | 20 61 6e 79 20 74 65 78 | used on| any tex|
|00002e00| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|00002e10| 2e 0d 09 33 2e 09 53 75 | 62 63 6c 61 73 73 20 65 |...3..Su|bclass e|
|00002e20| 78 69 73 74 69 6e 67 20 | 74 6f 6f 6c 73 2e 20 49 |xisting |tools. I|
|00002e30| 6e 20 70 61 72 74 69 63 | 75 6c 61 72 2c 20 79 6f |n partic|ular, yo|
|00002e40| 75 20 6d 61 79 20 6e 65 | 65 64 20 74 6f 20 63 72 |u may ne|ed to cr|
|00002e50| 65 61 74 65 20 61 20 73 | 75 62 63 6c 61 73 73 20 |eate a s|ubclass |
|00002e60| 6f 66 20 46 57 5f 43 53 | 74 72 69 6e 67 54 6f 6f |of FW_CS|tringToo|
|00002e70| 6c 20 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 63 68 |l in ord|er to ch|
|00002e80| 61 6e 67 65 20 74 68 65 | 20 64 65 66 61 75 6c 74 |ange the| default|
|00002e90| 20 62 65 68 61 76 69 6f | 72 20 66 6f 72 20 73 74 | behavio|r for st|
|00002ea0| 72 69 6e 67 20 6f 70 65 | 72 61 74 69 6f 6e 73 2e |ring ope|rations.|
|00002eb0| 20 0d 49 66 20 79 6f 75 | 20 6e 65 65 64 20 74 6f | .If you| need to|
|00002ec0| 20 63 68 61 6e 67 65 20 | 74 68 65 20 62 65 68 61 | change |the beha|
|00002ed0| 76 69 6f 72 20 6f 66 20 | 61 20 74 6f 6f 6c 2c 20 |vior of |a tool, |
|00002ee0| 63 72 65 61 74 65 20 61 | 20 6e 65 77 20 73 75 62 |create a| new sub|
|00002ef0| 63 6c 61 73 73 2c 20 61 | 6e 64 20 74 68 65 6e 20 |class, a|nd then |
|00002f00| 69 6e 73 74 61 6c 6c 20 | 61 6e 20 69 6e 73 74 61 |install |an insta|
|00002f10| 6e 63 65 20 6f 66 20 79 | 6f 75 72 20 74 6f 6f 6c |nce of y|our tool|
|00002f20| 20 61 73 20 74 68 65 20 | d2 63 75 72 72 65 6e 74 | as the |.current|
|00002f30| 20 74 6f 6f 6c d3 2e 20 | 46 6f 72 20 65 78 61 6d | tool.. |For exam|
|00002f40| 70 6c 65 2c 20 79 6f 75 | 20 6d 69 67 68 74 20 77 |ple, you| might w|
|00002f50| 61 6e 74 20 74 6f 20 63 | 72 65 61 74 65 20 61 20 |ant to c|reate a |
|00002f60| 73 74 72 69 6e 67 20 74 | 6f 6f 6c 20 74 68 61 74 |string t|ool that|
|00002f70| 20 64 6f 65 73 20 63 61 | 73 65 2d 69 6e 73 65 6e | does ca|se-insen|
|00002f80| 73 69 74 69 76 65 20 73 | 74 72 69 6e 67 20 63 6f |sitive s|tring co|
|00002f90| 6d 70 61 72 69 73 6f 6e | 73 2e 20 59 6f 75 20 63 |mparison|s. You c|
|00002fa0| 61 6e 20 69 6e 73 74 61 | 6c 6c 20 74 68 69 73 20 |an insta|ll this |
|00002fb0| 74 6f 6f 6c 20 75 73 69 | 6e 67 20 74 68 65 20 73 |tool usi|ng the s|
|00002fc0| 74 61 74 69 63 20 63 6c | 61 73 73 20 6d 65 74 68 |tatic cl|ass meth|
|00002fd0| 6f 64 20 46 57 5f 43 53 | 74 72 69 6e 67 54 6f 6f |od FW_CS|tringToo|
|00002fe0| 6c 20 3c 74 43 68 61 72 | 61 63 74 65 72 3e 3a 3a |l <tChar|acter>::|
|00002ff0| 53 65 74 43 75 72 72 65 | 6e 74 2d 53 74 72 69 6e |SetCurre|nt-Strin|
|00003000| 67 54 6f 6f 6c 28 29 2e | 20 0d 43 61 74 63 68 69 |gTool().| .Catchi|
|00003010| 6e 67 20 53 74 72 69 6e | 67 73 20 63 6f 6d 70 6f |ng Strin|gs compo|
|00003020| 6e 65 6e 74 20 65 78 63 | 65 70 74 69 6f 6e 73 0d |nent exc|eptions.|
|00003030| 54 68 69 73 20 63 6f 6d | 70 6f 6e 65 6e 74 20 74 |This com|ponent t|
|00003040| 68 72 6f 77 73 20 6e 6f | 20 65 78 63 65 70 74 69 |hrows no| excepti|
|00003050| 6f 6e 73 2e 0d 50 6c 61 | 74 66 6f 72 6d 20 64 65 |ons..Pla|tform de|
|00003060| 70 65 6e 64 65 6e 63 69 | 65 73 20 69 6e 20 74 68 |pendenci|es in th|
|00003070| 65 20 53 74 72 69 6e 67 | 73 20 63 6f 6d 70 6f 6e |e String|s compon|
|00003080| 65 6e 74 0d 50 61 73 63 | 61 6c 20 73 74 72 69 6e |ent.Pasc|al strin|
|00003090| 67 73 20 61 72 65 20 6f | 6e 6c 79 20 73 75 70 70 |gs are o|nly supp|
|000030a0| 6f 72 74 65 64 20 6f 6e | 20 74 68 65 20 4d 61 63 |orted on| the Mac|
|000030b0| 69 6e 74 6f 73 68 20 70 | 6c 61 74 66 6f 72 6d 2e |intosh p|latform.|
|000030c0| 0d 53 74 72 69 6e 67 73 | 20 63 6f 6d 70 6f 6e 65 |.Strings| compone|
|000030d0| 6e 74 20 74 61 73 6b 73 | 0d 54 68 69 73 20 73 65 |nt tasks|.This se|
|000030e0| 63 74 69 6f 6e 20 63 6f | 6e 74 61 69 6e 73 20 73 |ction co|ntains s|
|000030f0| 65 76 65 72 61 6c 20 72 | 65 70 72 65 73 65 6e 74 |everal r|epresent|
|00003100| 61 74 69 76 65 20 74 61 | 73 6b 73 20 74 68 61 74 |ative ta|sks that|
|00003110| 20 75 73 65 20 53 74 72 | 69 6e 67 73 20 63 6f 6d | use Str|ings com|
|00003120| 70 6f 6e 65 6e 74 20 63 | 6c 61 73 73 65 73 2e 0d |ponent c|lasses..|
|00003130| 45 78 74 65 6e 64 69 6e | 67 20 46 57 5f 54 42 6f |Extendin|g FW_TBo|
|00003140| 75 6e 64 65 64 53 74 72 | 69 6e 67 20 74 6f 20 68 |undedStr|ing to h|
|00003150| 61 6e 64 6c 65 20 61 20 | 36 34 2d 63 68 61 72 61 |andle a |64-chara|
|00003160| 63 74 65 72 20 73 74 72 | 69 6e 67 20 6f 66 20 6e |cter str|ing of n|
|00003170| 61 74 69 76 65 20 63 68 | 61 72 61 63 74 65 72 73 |ative ch|aracters|
|00003180| 3a 0d 09 31 2e 09 4f 70 | 74 69 6f 6e 61 6c 6c 79 |:..1..Op|tionally|
|00003190| 2c 20 64 65 66 69 6e 65 | 20 61 20 74 79 70 65 64 |, define| a typed|
|000031a0| 65 66 20 66 6f 72 20 79 | 6f 75 72 20 73 74 72 69 |ef for y|our stri|
|000031b0| 6e 67 73 20 6f 62 6a 65 | 63 74 20 61 6e 64 20 70 |ngs obje|ct and p|
|000031c0| 6c 61 63 65 20 69 74 20 | 69 6e 20 74 68 65 20 46 |lace it |in the F|
|000031d0| 57 43 68 61 72 61 63 2e | 68 20 66 69 6c 65 2e 0d |WCharac.|h file..|
|000031e0| 09 74 79 70 65 64 65 66 | 20 46 57 5f 54 42 6f 75 |.typedef| FW_TBou|
|000031f0| 6e 64 65 64 53 74 72 69 | 6e 67 3c 36 34 3e 20 4d |ndedStri|ng<64> M|
|00003200| 79 53 74 72 69 6e 67 36 | 34 0d 09 32 2e 09 49 6e |yString6|4..2..In|
|00003210| 73 74 61 6e 74 69 61 74 | 65 20 61 20 62 6f 75 6e |stantiat|e a boun|
|00003220| 64 65 64 20 73 74 72 69 | 6e 67 20 6f 62 6a 65 63 |ded stri|ng objec|
|00003230| 74 2e 20 50 61 73 73 20 | 79 6f 75 72 20 73 74 72 |t. Pass |your str|
|00003240| 69 6e 67 20 6c 65 6e 67 | 74 68 20 76 61 6c 75 65 |ing leng|th value|
|00003250| 20 74 6f 20 74 68 65 20 | 63 6c 61 73 73 20 74 65 | to the |class te|
|00003260| 6d 70 6c 61 74 65 2e 20 | 0d 09 46 57 5f 54 42 6f |mplate. |..FW_TBo|
|00003270| 75 6e 64 65 64 53 74 72 | 69 6e 67 3c 36 34 3e 20 |undedStr|ing<64> |
|00003280| 6d 79 53 74 72 69 6e 67 | 36 34 4f 62 6a 3b 0d 0d |myString|64Obj;..|
|00003290| 49 66 20 79 6f 75 20 64 | 65 63 6c 61 72 65 64 20 |If you d|eclared |
|000032a0| 61 20 74 79 70 65 64 65 | 66 2c 20 79 6f 75 20 6d |a typede|f, you m|
|000032b0| 61 79 20 75 73 65 20 74 | 68 65 20 66 6f 6c 6c 6f |ay use t|he follo|
|000032c0| 77 69 6e 67 20 73 79 6e | 74 61 78 3a 0d 0d 09 6d |wing syn|tax:...m|
|000032d0| 79 53 74 72 69 6e 67 36 | 34 20 6d 79 53 74 72 69 |yString6|4 myStri|
|000032e0| 6e 67 36 34 6f 62 6a 3b | 0d 0d 41 72 63 68 69 76 |ng64obj;|..Archiv|
|000032f0| 69 6e 67 20 61 20 73 74 | 72 69 6e 67 73 20 6f 62 |ing a st|rings ob|
|00003300| 6a 65 63 74 20 6f 66 20 | 79 6f 75 72 20 6f 77 6e |ject of |your own|
|00003310| 20 74 79 70 65 0d 09 31 | 2e 09 44 65 66 69 6e 65 | type..1|..Define|
|00003320| 20 61 20 74 79 70 65 64 | 65 66 20 66 6f 72 20 79 | a typed|ef for y|
|00003330| 6f 75 72 20 73 74 72 69 | 6e 67 73 20 6f 62 6a 65 |our stri|ngs obje|
|00003340| 63 74 20 61 6e 64 20 70 | 6c 61 63 65 20 69 74 20 |ct and p|lace it |
|00003350| 69 6e 20 74 68 65 20 46 | 57 43 68 61 72 61 63 2e |in the F|WCharac.|
|00003360| 68 20 66 69 6c 65 2e 0d | 0d 09 74 79 70 65 64 65 |h file..|..typede|
|00003370| 66 20 46 57 5f 54 42 6f | 75 6e 64 65 64 53 74 72 |f FW_TBo|undedStr|
|00003380| 69 6e 67 3c 36 34 3e 20 | 4d 79 53 74 72 69 6e 67 |ing<64> |MyString|
|00003390| 36 34 0d 09 32 2e 09 49 | 6e 76 6f 6b 65 20 74 68 |64..2..I|nvoke th|
|000033a0| 65 20 46 57 5f 44 45 46 | 49 4e 45 5f 43 4c 41 53 |e FW_DEF|INE_CLAS|
|000033b0| 53 5f 4d 31 20 6d 61 63 | 72 6f 2e 20 50 61 73 73 |S_M1 mac|ro. Pass|
|000033c0| 20 74 68 65 20 74 65 6d | 70 6c 61 74 65 20 6e 61 | the tem|plate na|
|000033d0| 6d 65 20 66 6f 72 20 79 | 6f 75 72 20 74 79 70 65 |me for y|our type|
|000033e0| 64 65 66 d5 65 64 20 63 | 6c 61 73 73 20 74 6f 20 |def.ed c|lass to |
|000033f0| 74 68 65 20 6d 61 63 72 | 6f 2e 0d 0d 20 09 46 57 |the macr|o... .FW|
|00003400| 5f 44 45 46 49 4e 45 5f | 43 4c 41 53 53 5f 4d 31 |_DEFINE_|CLASS_M1|
|00003410| 28 4d 79 53 74 72 69 6e | 67 36 34 2c 46 57 5f 43 |(MyStrin|g64,FW_C|
|00003420| 53 74 72 69 6e 67 29 0d | 0d 09 33 2e 09 49 6e 76 |String).|..3..Inv|
|00003430| 6f 6b 65 20 74 68 65 20 | 46 57 5f 52 45 47 49 53 |oke the |FW_REGIS|
|00003440| 54 45 52 5f 41 52 43 48 | 49 56 45 5f 43 4c 41 53 |TER_ARCH|IVE_CLAS|
|00003450| 53 20 6d 61 63 72 6f 20 | 61 6e 64 20 70 61 73 73 |S macro |and pass|
|00003460| 20 79 6f 75 72 20 63 6c | 61 73 73 20 6e 61 6d 65 | your cl|ass name|
|00003470| 2c 20 61 6e 64 20 6e 61 | 6d 65 73 20 6f 66 20 63 |, and na|mes of c|
|00003480| 75 73 74 6f 6d 20 69 6e | 70 75 74 20 61 6e 64 20 |ustom in|put and |
|00003490| 6f 75 74 70 75 74 20 66 | 75 6e 63 74 69 6f 6e 73 |output f|unctions|
|000034a0| 20 74 6f 20 74 68 69 73 | 20 6d 61 63 72 6f 2e 20 | to this| macro. |
|000034b0| 53 65 65 20 74 68 65 20 | 41 72 63 68 69 76 65 72 |See the |Archiver|
|000034c0| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 20 66 6f 72 20 |s compon|ent for |
|000034d0| 64 65 74 61 69 6c 73 20 | 6f 6e 20 74 68 69 73 20 |details |on this |
|000034e0| 6d 61 63 72 6f 2e 0d 0d | 54 68 69 73 20 6d 61 63 |macro...|This mac|
|000034f0| 72 6f 20 72 65 71 75 69 | 72 65 73 20 74 68 61 74 |ro requi|res that|
|00003500| 20 63 75 73 74 6f 6d 20 | 66 75 6e 63 74 69 6f 6e | custom |function|
|00003510| 73 20 62 65 20 64 65 66 | 69 6e 65 64 20 74 6f 20 |s be def|ined to |
|00003520| 68 61 6e 64 6c 65 20 6f | 62 6a 65 63 74 73 20 6f |handle o|bjects o|
|00003530| 66 20 79 6f 75 72 20 74 | 79 70 65 2e 20 46 6f 72 |f your t|ype. For|
|00003540| 20 79 6f 75 72 20 63 6f | 6e 76 65 6e 69 65 6e 63 | your co|nvenienc|
|00003550| 65 2c 20 4f 50 46 20 70 | 72 6f 76 69 64 65 73 20 |e, OPF p|rovides |
|00003560| 74 68 65 73 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |these fu|nctions |
|00003570| 69 6e 20 74 68 65 20 46 | 57 5f 54 53 74 72 69 6e |in the F|W_TStrin|
|00003580| 67 41 72 63 68 69 76 65 | 72 20 63 6c 61 73 73 2e |gArchive|r class.|
|00003590| 0d 0d 54 68 65 20 6d 61 | 63 72 6f 20 72 65 67 69 |..The ma|cro regi|
|000035a0| 73 74 65 72 73 20 74 68 | 65 73 65 20 66 75 6e 63 |sters th|ese func|
|000035b0| 74 69 6f 6e 73 20 69 6e | 20 74 68 65 20 61 72 63 |tions in| the arc|
|000035c0| 68 69 76 65 20 72 65 67 | 69 73 74 72 79 20 74 61 |hive reg|istry ta|
|000035d0| 62 6c 65 2e 20 57 68 65 | 6e 20 79 6f 75 20 69 6e |ble. Whe|n you in|
|000035e0| 73 65 72 74 20 6f 72 20 | 65 78 74 72 61 63 74 20 |sert or |extract |
|000035f0| 73 74 72 69 6e 67 73 20 | 6f 62 6a 65 63 74 73 20 |strings |objects |
|00003600| 6f 66 20 79 6f 75 72 20 | 74 79 70 65 20 74 6f 20 |of your |type to |
|00003610| 61 6e 20 61 72 63 68 69 | 76 65 20 6f 62 6a 65 63 |an archi|ve objec|
|00003620| 74 2c 20 69 74 20 6c 6f | 6f 6b 73 20 75 70 20 74 |t, it lo|oks up t|
|00003630| 68 65 73 65 20 66 75 6e | 63 74 69 6f 6e 73 20 69 |hese fun|ctions i|
|00003640| 6e 20 74 68 65 20 61 72 | 63 68 69 76 65 20 72 65 |n the ar|chive re|
|00003650| 67 69 73 74 72 79 2c 20 | 61 6e 64 20 75 73 65 73 |gistry, |and uses|
|00003660| 20 74 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 | these f|unctions|
|00003670| 20 74 6f 20 6d 61 6e 69 | 70 75 6c 61 74 65 20 79 | to mani|pulate y|
|00003680| 6f 75 72 20 6f 62 6a 65 | 63 74 73 2e 0d 0d 46 57 |our obje|cts...FW|
|00003690| 5f 52 45 47 49 53 54 45 | 52 5f 41 52 43 48 49 56 |_REGISTE|R_ARCHIV|
|000036a0| 45 5f 43 4c 41 53 53 0d | 28 46 57 5f 4c 53 74 72 |E_CLASS.|(FW_LStr|
|000036b0| 69 6e 67 36 34 2c 20 4d | 79 53 74 72 69 6e 67 36 |ing64, M|yString6|
|000036c0| 34 2c 0d 28 46 57 5f 54 | 53 74 72 69 6e 67 41 72 |4,.(FW_T|StringAr|
|000036d0| 63 68 69 76 65 72 3c 4d | 79 53 74 72 69 6e 67 36 |chiver<M|yString6|
|000036e0| 34 3e 3a 3a 52 65 61 64 | 29 2c 0d 28 46 57 5f 54 |4>::Read|),.(FW_T|
|000036f0| 53 74 72 69 6e 67 41 72 | 63 68 69 76 65 72 3c 4d |StringAr|chiver<M|
|00003700| 79 53 74 72 69 6e 67 36 | 34 3e 3a 3a 57 72 69 74 |yString6|4>::Writ|
|00003710| 65 29 29 0d 0d 4e 6f 74 | 65 20 74 68 61 74 20 74 |e))..Not|e that t|
|00003720| 68 69 73 20 69 73 20 6d | 61 63 72 6f 20 64 65 63 |his is m|acro dec|
|00003730| 6c 61 72 61 74 69 6f 6e | 20 75 73 65 73 20 61 20 |laration| uses a |
|00003740| 6e 65 73 74 65 64 20 70 | 61 72 65 6e 74 68 65 73 |nested p|arenthes|
|00003750| 69 73 20 74 6f 20 64 65 | 63 6c 61 72 65 20 79 6f |is to de|clare yo|
|00003760| 75 72 20 72 65 61 64 20 | 61 6e 64 20 77 72 69 74 |ur read |and writ|
|00003770| 65 20 66 75 6e 63 74 69 | 6f 6e 73 2e 0d 09 34 2e |e functi|ons...4.|
|00003780| 09 49 6e 73 74 61 6e 74 | 69 61 74 65 20 61 20 73 |.Instant|iate a s|
|00003790| 69 6e 6b 20 61 6e 64 20 | 61 20 77 72 69 74 61 62 |ink and |a writab|
|000037a0| 6c 65 20 61 72 63 68 69 | 76 65 2c 20 61 6e 64 20 |le archi|ve, and |
|000037b0| 70 61 73 73 20 79 6f 75 | 72 20 73 69 6e 6b 20 74 |pass you|r sink t|
|000037c0| 6f 20 74 68 65 20 61 72 | 63 68 69 76 65 20 6f 62 |o the ar|chive ob|
|000037d0| 6a 65 63 74 2e 20 0d 0d | 2f 2f 20 69 66 20 79 6f |ject. ..|// if yo|
|000037e0| 75 20 69 6e 73 74 61 6e | 74 69 61 74 65 20 61 20 |u instan|tiate a |
|000037f0| 66 69 6c 65 20 61 63 63 | 65 73 73 20 6f 62 6a 65 |file acc|ess obje|
|00003800| 63 74 0d 2f 2f 20 68 65 | 72 65 2c 20 79 6f 75 72 |ct.// he|re, your|
|00003810| 20 6f 62 6a 65 63 74 20 | 77 69 6c 6c 20 62 65 20 | object |will be |
|00003820| 73 65 6e 74 20 74 6f 20 | 61 20 0d 2f 2f 20 66 69 |sent to |a .// fi|
|00003830| 6c 65 20 72 65 73 69 64 | 69 6e 67 20 6f 6e 20 61 |le resid|ing on a|
|00003840| 20 64 69 73 6b 20 64 72 | 69 76 65 2e 0d 0d 46 57 | disk dr|ive...FW|
|00003850| 5f 43 57 72 69 74 61 62 | 6c 65 41 72 63 68 69 76 |_CWritab|leArchiv|
|00003860| 65 20 6d 79 41 72 63 68 | 69 76 65 28 6d 79 53 69 |e myArch|ive(mySi|
|00003870| 6e 6b 29 3b 0d 09 35 2e | 09 41 72 63 68 69 76 65 |nk);..5.|.Archive|
|00003880| 20 79 6f 75 72 20 73 74 | 72 69 6e 67 73 20 6f 62 | your st|rings ob|
|00003890| 6a 65 63 74 20 74 6f 20 | 79 6f 75 72 20 73 69 6e |ject to |your sin|
|000038a0| 6b 2e 20 4e 6f 74 65 20 | 74 68 61 74 20 79 6f 75 |k. Note |that you|
|000038b0| 20 6d 75 73 74 20 69 6e | 73 74 61 6e 74 69 61 74 | must in|stantiat|
|000038c0| 65 20 61 20 46 57 5f 43 | 52 65 61 64 61 62 6c 65 |e a FW_C|Readable|
|000038d0| 41 72 63 68 69 76 65 20 | 6f 62 6a 65 63 74 20 74 |Archive |object t|
|000038e0| 6f 20 72 65 61 64 20 74 | 68 65 20 61 72 63 68 69 |o read t|he archi|
|000038f0| 76 65 64 20 73 74 72 69 | 6e 67 73 20 6f 62 6a 65 |ved stri|ngs obje|
|00003900| 63 74 20 62 61 63 6b 20 | 66 72 6f 6d 20 79 6f 75 |ct back |from you|
|00003910| 72 20 73 69 6e 6b 2e 20 | 0d 0d 6d 79 41 72 63 68 |r sink. |..myArch|
|00003920| 69 76 65 20 3e 3e 20 6d | 79 53 74 72 69 6e 67 36 |ive >> m|yString6|
|00003930| 34 4f 62 6a 3b 0d 54 72 | 61 6e 73 6c 61 74 69 6e |4Obj;.Tr|anslatin|
|00003940| 67 20 73 74 72 69 6e 67 | 73 20 62 65 74 77 65 65 |g string|s betwee|
|00003950| 6e 20 4d 61 63 69 6e 74 | 6f 73 68 20 61 6e 64 20 |n Macint|osh and |
|00003960| 4f 50 46 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 |OPF envi|ronments|
|00003970| 0d 54 68 65 73 65 20 63 | 61 6c 6c 73 20 61 72 65 |.These c|alls are|
|00003980| 20 75 73 65 66 75 6c 20 | 6f 6e 20 74 68 65 20 4d | useful |on the M|
|00003990| 61 63 69 6e 74 6f 73 68 | 20 70 6c 61 74 66 6f 72 |acintosh| platfor|
|000039a0| 6d 2c 20 77 68 65 72 65 | 20 74 6f 6f 6c 62 6f 78 |m, where| toolbox|
|000039b0| 20 72 6f 75 74 69 6e 65 | 73 20 72 65 71 75 69 72 | routine|s requir|
|000039c0| 65 20 70 61 73 63 61 6c | 20 73 74 72 69 6e 67 73 |e pascal| strings|
|000039d0| 2e 0d a5 09 54 6f 20 69 | 6d 70 6f 72 74 20 61 20 |....To i|mport a |
|000039e0| 70 61 73 63 61 6c 20 73 | 74 72 69 6e 67 20 66 72 |pascal s|tring fr|
|000039f0| 6f 6d 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |om the M|acintosh|
|00003a00| 20 54 6f 6f 6c 62 6f 78 | 20 74 6f 20 61 20 4f 50 | Toolbox| to a OP|
|00003a10| 46 20 72 75 6e 74 69 6d | 65 20 65 6e 76 69 72 6f |F runtim|e enviro|
|00003a20| 6e 6d 65 6e 74 2c 20 75 | 73 65 20 46 57 5f 43 53 |nment, u|se FW_CS|
|00003a30| 74 72 69 6e 67 3a 3a 52 | 65 70 6c 61 63 65 20 41 |tring::R|eplace A|
|00003a40| 6c 6c 28 46 57 5f 50 61 | 73 63 61 6c 43 68 61 72 |ll(FW_Pa|scalChar|
|00003a50| 2a 20 73 74 72 69 6e 67 | 29 2e 0d a5 09 54 6f 20 |* string|)....To |
|00003a60| 65 78 70 6f 72 74 20 61 | 20 4f 50 46 20 73 74 72 |export a| OPF str|
|00003a70| 69 6e 67 20 66 72 6f 6d | 20 61 20 4f 50 46 20 72 |ing from| a OPF r|
|00003a80| 75 6e 74 69 6d 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |untime e|nvironme|
|00003a90| 6e 74 20 74 6f 20 74 68 | 65 20 4d 61 63 69 6e 74 |nt to th|e Macint|
|00003aa0| 6f 73 68 20 54 6f 6f 6c | 62 6f 78 2c 20 75 73 65 |osh Tool|box, use|
|00003ab0| 20 46 57 5f 43 53 74 72 | 69 6e 67 3a 3a 45 78 70 | FW_CStr|ing::Exp|
|00003ac0| 6f 72 74 20 50 61 73 63 | 61 6c 28 46 57 5f 50 61 |ort Pasc|al(FW_Pa|
|00003ad0| 73 63 61 6c 43 68 61 72 | 2a 20 62 75 66 66 65 72 |scalChar|* buffer|
|00003ae0| 29 20 63 6f 6e 73 74 2e | 0d 46 57 5f 43 44 79 6e |) const.|.FW_CDyn|
|00003af0| 61 6d 69 63 53 74 72 69 | 6e 67 20 63 6c 61 73 73 |amicStri|ng class|
|00003b00| 0d 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 0d 46 57 |.Introdu|ction.FW|
|00003b10| 5f 43 44 79 6e 61 6d 69 | 63 53 74 72 69 6e 67 20 |_CDynami|cString |
|00003b20| 61 6c 6c 6f 63 61 74 65 | 73 20 73 74 6f 72 61 67 |allocate|s storag|
|00003b30| 65 20 66 6f 72 20 61 20 | 73 74 72 69 6e 67 20 61 |e for a |string a|
|00003b40| 73 20 61 20 72 65 73 69 | 7a 61 62 6c 65 20 62 6c |s a resi|zable bl|
|00003b50| 6f 63 6b 20 6f 66 20 6d | 65 6d 6f 72 79 20 61 6c |ock of m|emory al|
|00003b60| 6c 6f 63 61 74 65 64 20 | 6f 6e 20 74 68 65 20 68 |located |on the h|
|00003b70| 65 61 70 2e 0d 46 57 5f | 43 44 79 6e 61 6d 69 63 |eap..FW_|CDynamic|
|00003b80| 53 74 72 69 6e 67 20 69 | 6e 68 65 72 69 74 73 20 |String i|nherits |
|00003b90| 69 74 73 20 70 72 6f 74 | 6f 63 6f 6c 20 66 72 6f |its prot|ocol fro|
|00003ba0| 6d 20 74 68 65 20 46 57 | 5f 43 53 74 72 69 6e 67 |m the FW|_CString|
|00003bb0| 20 63 6c 61 73 73 2e 20 | 46 57 5f 43 53 74 72 69 | class. |FW_CStri|
|00003bc0| 6e 67 20 64 65 66 69 6e | 65 73 20 74 68 65 20 69 |ng defin|es the i|
|00003bd0| 6e 74 65 72 66 61 63 65 | 2c 20 61 6e 64 20 46 57 |nterface|, and FW|
|00003be0| 5f 43 44 79 6e 61 6d 69 | 63 2d 53 74 72 69 6e 67 |_CDynami|c-String|
|00003bf0| 20 70 72 6f 76 69 64 65 | 73 20 61 6e 20 69 6d 70 | provide|s an imp|
|00003c00| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 2e 20 0d 48 65 |lementat|ion. .He|
|00003c10| 61 64 65 72 20 46 69 6c | 65 0d 46 57 54 53 74 72 |ader Fil|e.FWTStr|
|00003c20| 73 2e 68 0d 48 65 72 69 | 74 61 67 65 0d 46 57 5f |s.h.Heri|tage.FW_|
|00003c30| 43 53 74 72 69 6e 67 09 | 32 37 0d a5 46 57 5f 54 |CString.|27..FW_T|
|00003c40| 42 6f 75 6e 64 65 64 53 | 74 72 69 6e 67 09 36 31 |BoundedS|tring.61|
|00003c50| 0d a5 46 57 5f 43 44 79 | 6e 61 6d 69 63 53 74 72 |..FW_CDy|namicStr|
|00003c60| 69 6e 67 0d 55 73 69 6e | 67 20 46 57 5f 43 44 79 |ing.Usin|g FW_CDy|
|00003c70| 6e 61 6d 69 63 53 74 72 | 69 6e 67 0d 49 6e 73 74 |namicStr|ing.Inst|
|00003c80| 61 6e 74 69 61 74 65 20 | 61 20 46 57 5f 43 44 79 |antiate |a FW_CDy|
|00003c90| 6e 61 6d 69 63 53 74 72 | 69 6e 67 20 6f 62 6a 65 |namicStr|ing obje|
|00003ca0| 63 74 20 77 68 65 6e 65 | 76 65 72 20 79 6f 75 20 |ct whene|ver you |
|00003cb0| 6e 65 65 64 20 74 6f 20 | 63 72 65 61 74 65 20 61 |need to |create a|
|00003cc0| 20 73 74 72 69 6e 67 20 | 6f 62 6a 65 63 74 20 74 | string |object t|
|00003cd0| 68 61 74 20 6d 61 79 20 | 6e 65 65 64 20 74 6f 20 |hat may |need to |
|00003ce0| 62 65 20 72 65 73 69 7a | 65 64 2e 0d 53 75 62 63 |be resiz|ed..Subc|
|00003cf0| 6c 61 73 73 69 6e 67 20 | 46 57 5f 43 44 79 6e 61 |lassing |FW_CDyna|
|00003d00| 6d 69 63 53 74 72 69 6e | 67 0d 59 6f 75 20 77 69 |micStrin|g.You wi|
|00003d10| 6c 6c 20 6e 6f 74 20 6e | 6f 72 6d 61 6c 6c 79 20 |ll not n|ormally |
|00003d20| 6e 65 65 64 20 74 6f 20 | 63 72 65 61 74 65 20 61 |need to |create a|
|00003d30| 20 73 75 62 63 6c 61 73 | 73 20 6f 66 20 46 57 5f | subclas|s of FW_|
|00003d40| 43 44 79 6e 61 6d 69 63 | 53 74 72 69 6e 67 2e 20 |CDynamic|String. |
|00003d50| 0d 4f 76 65 72 72 69 64 | 69 6e 67 20 4d 65 74 68 |.Overrid|ing Meth|
|00003d60| 6f 64 73 0d 49 66 20 79 | 6f 75 d5 76 65 20 64 65 |ods.If y|ou.ve de|
|00003d70| 74 65 72 6d 69 6e 65 64 | 20 74 68 61 74 20 79 6f |termined| that yo|
|00003d80| 75 20 72 65 61 6c 6c 79 | 20 77 61 6e 74 20 74 6f |u really| want to|
|00003d90| 20 73 75 62 63 6c 61 73 | 73 20 46 57 5f 43 44 79 | subclas|s FW_CDy|
|00003da0| 2d 6e 61 6d 69 63 53 74 | 72 69 6e 67 2c 20 79 6f |-namicSt|ring, yo|
|00003db0| 75 20 6d 61 79 20 6e 65 | 65 64 20 74 6f 20 6f 76 |u may ne|ed to ov|
|00003dc0| 65 72 72 69 64 65 20 73 | 6f 6d 65 20 6f 66 20 74 |erride s|ome of t|
|00003dd0| 68 65 20 73 65 76 65 6e | 20 76 69 72 74 75 61 6c |he seven| virtual|
|00003de0| 20 66 75 6e 63 74 69 6f | 6e 73 20 64 65 66 69 6e | functio|ns defin|
|00003df0| 65 64 20 69 6e 20 46 57 | 5f 43 53 74 72 69 6e 67 |ed in FW|_CString|
|00003e00| 2c 20 61 6e 64 20 79 6f | 75 20 77 69 6c 6c 20 70 |, and yo|u will p|
|00003e10| 72 6f 62 61 62 6c 79 20 | 6e 65 65 64 20 74 6f 20 |robably |need to |
|00003e20| 70 72 6f 76 69 64 65 20 | 63 6f 6e 73 74 72 75 63 |provide |construc|
|00003e30| 74 6f 72 73 20 61 6e 64 | 20 61 73 73 69 67 6e 6d |tors and| assignm|
|00003e40| 65 6e 74 20 6f 70 65 72 | 61 74 6f 72 73 2e 0d 49 |ent oper|ators..I|
|00003e50| 6e 73 74 61 6e 74 69 61 | 74 69 6e 67 20 46 57 5f |nstantia|ting FW_|
|00003e60| 43 44 79 6e 61 6d 69 63 | 53 74 72 69 6e 67 0d 49 |CDynamic|String.I|
|00003e70| 6e 73 74 61 6e 74 69 61 | 74 65 20 61 20 64 79 6e |nstantia|te a dyn|
|00003e80| 61 6d 69 63 20 73 74 72 | 69 6e 67 20 77 68 65 6e |amic str|ing when|
|00003e90| 65 76 65 72 20 79 6f 75 | 20 6e 65 65 64 20 61 20 |ever you| need a |
|00003ea0| 73 74 72 69 6e 67 20 6f | 62 6a 65 63 74 20 61 6e |string o|bject an|
|00003eb0| 64 20 79 6f 75 d5 76 65 | 20 64 65 74 65 72 6d 69 |d you.ve| determi|
|00003ec0| 6e 65 64 20 74 68 61 74 | 20 74 68 65 20 64 79 6e |ned that| the dyn|
|00003ed0| 61 6d 69 63 20 73 74 72 | 69 6e 67 20 70 72 6f 76 |amic str|ing prov|
|00003ee0| 69 64 65 73 20 74 68 65 | 20 63 6f 72 72 65 63 74 |ides the| correct|
|00003ef0| 20 73 70 61 63 65 2f 74 | 69 6d 65 20 74 72 61 64 | space/t|ime trad|
|00003f00| 65 6f 66 66 73 2e 20 4e | 6f 74 65 20 74 68 61 74 |eoffs. N|ote that|
|00003f10| 20 64 79 6e 61 6d 69 63 | 20 73 74 72 69 6e 67 73 | dynamic| strings|
|00003f20| 2c 20 75 6e 6c 69 6b 65 | 20 62 6f 75 6e 64 65 64 |, unlike| bounded|
|00003f30| 20 73 74 72 69 6e 67 73 | 2c 20 63 61 6e 20 67 72 | strings|, can gr|
|00003f40| 6f 77 20 74 6f 20 61 72 | 62 69 74 72 61 72 69 6c |ow to ar|bitraril|
|00003f50| 79 20 6c 61 72 67 65 20 | 73 69 7a 65 73 2e 20 41 |y large |sizes. A|
|00003f60| 6c 73 6f 2c 20 64 79 6e | 61 6d 69 63 20 73 74 72 |lso, dyn|amic str|
|00003f70| 69 6e 67 73 20 77 69 6c | 6c 20 68 61 76 65 20 6c |ings wil|l have l|
|00003f80| 65 73 73 20 77 61 73 74 | 65 64 20 73 70 61 63 65 |ess wast|ed space|
|00003f90| 20 74 68 61 6e 20 62 6f | 75 6e 64 65 64 20 73 74 | than bo|unded st|
|00003fa0| 72 69 6e 67 73 20 69 66 | 20 74 68 65 20 6c 65 6e |rings if| the len|
|00003fb0| 67 74 68 20 6f 66 20 74 | 68 65 20 73 74 72 69 6e |gth of t|he strin|
|00003fc0| 67 20 69 73 20 6e 6f 74 | 20 6b 6e 6f 77 6e 20 77 |g is not| known w|
|00003fd0| 69 74 68 69 6e 20 61 20 | 6e 61 72 72 6f 77 20 72 |ithin a |narrow r|
|00003fe0| 61 6e 67 65 20 61 74 20 | 63 6f 6d 70 69 6c 65 20 |ange at |compile |
|00003ff0| 74 69 6d 65 2e 0d 46 57 | 5f 43 44 79 6e 61 6d 69 |time..FW|_CDynami|
|00004000| 63 53 74 72 69 6e 67 20 | 4d 65 74 68 6f 64 73 0d |cString |Methods.|
|00004010| 0d 46 57 5f 43 44 79 6e | 61 6d 69 63 53 74 72 69 |.FW_CDyn|amicStri|
|00004020| 6e 67 28 46 57 5f 42 79 | 74 65 43 6f 75 6e 74 20 |ng(FW_By|teCount |
|00004030| 63 61 70 61 63 69 74 79 | 3d 30 29 3b 0d 0d 44 65 |capacity|=0);..De|
|00004040| 66 61 75 6c 74 20 43 6f | 6e 73 74 72 75 63 74 6f |fault Co|nstructo|
|00004050| 72 20 69 6e 73 74 61 6e | 74 69 61 74 65 73 20 61 |r instan|tiates a|
|00004060| 6e 20 65 6d 70 74 79 20 | 46 57 5f 43 44 79 6e 61 |n empty |FW_CDyna|
|00004070| 6d 69 63 53 74 72 69 6e | 67 20 6f 62 6a 65 63 74 |micStrin|g object|
|00004080| 2e 0d 0d 46 57 5f 43 44 | 79 6e 61 6d 69 63 53 74 |...FW_CD|ynamicSt|
|00004090| 72 69 6e 67 28 0d 09 09 | 09 09 09 63 6f 6e 73 74 |ring(...|...const|
|000040a0| 20 46 57 5f 43 44 79 6e | 61 6d 69 63 53 74 72 69 | FW_CDyn|amicStri|
|000040b0| 6e 67 20 26 73 74 72 69 | 6e 67 29 3b 0d 0d 43 6f |ng &stri|ng);..Co|
|000040c0| 70 79 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 2e 0d |py const|ructor..|
|000040d0| 0d 46 57 5f 43 44 79 6e | 61 6d 69 63 53 74 72 69 |.FW_CDyn|amicStri|
|000040e0| 6e 67 28 63 6f 6e 73 74 | 20 46 57 5f 43 53 74 72 |ng(const| FW_CStr|
|000040f0| 69 6e 67 20 26 73 74 72 | 69 6e 67 29 3b 0d 0d 43 |ing &str|ing);..C|
|00004100| 6f 6e 73 74 72 75 63 74 | 6f 72 20 69 6e 73 74 61 |onstruct|or insta|
|00004110| 6e 74 69 61 74 65 73 20 | 61 20 64 79 6e 61 6d 69 |ntiates |a dynami|
|00004120| 63 20 73 74 72 69 6e 67 | 20 6f 62 6a 65 63 74 20 |c string| object |
|00004130| 61 6e 64 20 63 6f 70 69 | 65 73 20 63 68 61 72 61 |and copi|es chara|
|00004140| 63 74 65 72 73 20 66 72 | 6f 6d 20 74 68 65 20 73 |cters fr|om the s|
|00004150| 74 72 69 6e 67 20 6f 62 | 6a 65 63 74 20 26 73 74 |tring ob|ject &st|
|00004160| 72 69 6e 67 2c 20 77 68 | 69 63 68 20 69 73 20 6e |ring, wh|ich is n|
|00004170| 6f 74 20 6f 66 20 74 79 | 70 65 20 46 57 5f 43 44 |ot of ty|pe FW_CD|
|00004180| 79 6e 61 6d 69 63 53 74 | 72 69 6e 67 2e 0d 0d 46 |ynamicSt|ring...F|
|00004190| 57 5f 43 44 79 6e 61 6d | 69 63 53 74 72 69 6e 67 |W_CDynam|icString|
|000041a0| 28 63 6f 6e 73 74 20 46 | 57 5f 43 68 61 72 20 2a |(const F|W_Char *|
|000041b0| 69 74 65 6d 73 2c 0d 09 | 09 09 09 09 09 46 57 5f |items,..|.....FW_|
|000041c0| 43 68 61 72 61 63 74 65 | 72 43 6f 75 6e 74 20 6e |Characte|rCount n|
|000041d0| 75 6d 62 65 72 49 74 65 | 6d 73 29 3b 0d 0d 43 6f |umberIte|ms);..Co|
|000041e0| 6e 73 74 72 75 63 74 6f | 72 20 69 6e 73 74 61 6e |nstructo|r instan|
|000041f0| 74 69 61 74 65 73 20 61 | 20 62 6f 75 6e 64 65 64 |tiates a| bounded|
|00004200| 20 73 74 72 69 6e 67 20 | 6f 62 6a 65 63 74 20 6e | string |object n|
|00004210| 75 6d 62 65 72 49 74 65 | 6d 73 20 6c 6f 6e 67 2e |umberIte|ms long.|
|00004220| 0d 0d 46 57 5f 43 44 79 | 6e 61 6d 69 63 53 74 72 |..FW_CDy|namicStr|
|00004230| 69 6e 67 28 63 6f 6e 73 | 74 20 46 57 5f 43 68 61 |ing(cons|t FW_Cha|
|00004240| 72 20 2a 69 74 65 6d 73 | 29 3b 0d 0d 43 6f 6e 73 |r *items|);..Cons|
|00004250| 74 72 75 63 74 6f 72 20 | 69 6e 73 74 61 6e 74 69 |tructor |instanti|
|00004260| 61 74 65 73 20 61 20 62 | 6f 75 6e 64 65 64 20 73 |ates a b|ounded s|
|00004270| 74 72 69 6e 67 20 6f 62 | 6a 65 63 74 2e 20 49 74 |tring ob|ject. It|
|00004280| 20 6c 6f 6f 6b 73 20 66 | 6f 72 20 61 20 6e 75 6c | looks f|or a nul|
|00004290| 20 63 68 61 72 61 63 74 | 65 72 20 6d 61 72 6b 69 | charact|er marki|
|000042a0| 6e 67 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |ng the e|nd of th|
|000042b0| 65 20 2a 69 74 65 6d 73 | 20 73 74 72 69 6e 67 2c |e *items| string,|
|000042c0| 20 61 6e 64 20 74 68 65 | 6e 20 63 6f 70 69 65 73 | and the|n copies|
|000042d0| 20 74 68 61 74 20 73 74 | 72 69 6e 67 20 69 6e 74 | that st|ring int|
|000042e0| 6f 20 74 68 65 20 6e 65 | 77 20 73 74 72 69 6e 67 |o the ne|w string|
|000042f0| 2e 0d 0d 7e 46 57 5f 43 | 44 79 6e 61 6d 69 63 53 |...~FW_C|DynamicS|
|00004300| 74 72 69 6e 67 28 29 3b | 0d 0d 43 6c 61 73 73 20 |tring();|..Class |
|00004310| 64 65 73 74 72 75 63 74 | 6f 72 2e 0d 0d 46 57 5f |destruct|or...FW_|
|00004320| 43 53 74 72 69 6e 67 26 | 20 6f 70 65 72 61 74 6f |CString&| operato|
|00004330| 72 3d 28 0d 09 09 09 09 | 09 63 6f 6e 73 74 20 46 |r=(.....|.const F|
|00004340| 57 5f 43 44 79 6e 61 6d | 69 63 53 74 72 69 6e 67 |W_CDynam|icString|
|00004350| 20 26 73 74 72 69 6e 67 | 29 3b 0d 0d 41 73 73 69 | &string|);..Assi|
|00004360| 67 6e 6d 65 6e 74 20 6f | 70 65 72 61 74 6f 72 20 |gnment o|perator |
|00004370| 66 6f 72 20 46 57 5f 43 | 44 79 6e 61 6d 69 63 53 |for FW_C|DynamicS|
|00004380| 74 72 69 6e 67 20 6f 62 | 6a 65 63 74 73 2e 0d 0d |tring ob|jects...|
|00004390| 46 57 5f 43 53 74 72 69 | 6e 67 26 20 6f 70 65 72 |FW_CStri|ng& oper|
|000043a0| 61 74 6f 72 3d 28 63 6f | 6e 73 74 20 46 57 5f 43 |ator=(co|nst FW_C|
|000043b0| 53 74 72 69 6e 67 26 20 | 73 74 72 69 6e 67 29 3b |String& |string);|
|000043c0| 0d 0d 41 73 73 69 67 6e | 6d 65 6e 74 20 6f 70 65 |..Assign|ment ope|
|000043d0| 72 61 74 6f 72 20 66 6f | 72 20 73 74 72 69 6e 67 |rator fo|r string|
|000043e0| 73 20 6e 6f 74 20 6f 66 | 20 74 79 70 65 20 46 57 |s not of| type FW|
|000043f0| 5f 43 44 79 6e 61 6d 69 | 63 53 74 72 69 6e 67 2e |_CDynami|cString.|
|00004400| 0d 0d 0d 46 57 5f 43 53 | 74 72 69 6e 67 26 20 6f |...FW_CS|tring& o|
|00004410| 70 65 72 61 74 6f 72 3d | 28 63 6f 6e 73 74 20 46 |perator=|(const F|
|00004420| 57 5f 43 68 61 72 2a 20 | 73 74 72 69 6e 67 29 3b |W_Char* |string);|
|00004430| 0d 0d 41 73 73 69 67 6e | 6d 65 6e 74 20 6f 70 65 |..Assign|ment ope|
|00004440| 72 61 74 6f 72 20 66 6f | 72 20 61 20 62 75 66 66 |rator fo|r a buff|
|00004450| 65 72 20 6f 66 20 74 79 | 70 65 20 46 57 5f 43 68 |er of ty|pe FW_Ch|
|00004460| 61 72 2e 0d 0d 76 69 72 | 74 75 61 6c 20 46 57 5f |ar...vir|tual FW_|
|00004470| 42 79 74 65 43 6f 75 6e | 74 20 47 72 6f 77 43 61 |ByteCoun|t GrowCa|
|00004480| 70 61 63 69 74 79 28 0d | 09 09 09 09 09 09 46 57 |pacity(.|......FW|
|00004490| 5f 42 79 74 65 43 6f 75 | 6e 74 20 63 61 70 61 63 |_ByteCou|nt capac|
|000044a0| 69 74 79 4e 65 65 64 65 | 64 29 3b 0d 0d 49 6e 74 |ityNeede|d);..Int|
|000044b0| 65 6e 64 65 64 20 74 6f | 20 65 78 70 61 6e 64 20 |ended to| expand |
|000044c0| 74 68 65 20 73 74 72 69 | 6e 67 2c 20 69 66 20 6e |the stri|ng, if n|
|000044d0| 65 63 65 73 73 61 72 79 | 2c 20 74 6f 20 63 61 70 |ecessary|, to cap|
|000044e0| 61 63 69 74 79 4e 65 65 | 64 65 64 2e 20 52 65 74 |acityNee|ded. Ret|
|000044f0| 75 72 6e 73 20 74 68 65 | 20 6e 65 77 20 63 61 70 |urns the| new cap|
|00004500| 61 63 69 74 79 20 6f 66 | 20 74 68 65 20 73 74 72 |acity of| the str|
|00004510| 69 6e 67 2e 20 54 68 65 | 20 63 61 70 61 63 69 74 |ing. The| capacit|
|00004520| 79 20 6f 66 20 61 20 73 | 74 72 69 6e 67 20 69 73 |y of a s|tring is|
|00004530| 20 6e 65 76 65 72 20 72 | 65 64 75 63 65 64 20 28 | never r|educed (|
|00004540| 65 78 63 65 70 74 20 62 | 79 20 64 65 6c 65 74 69 |except b|y deleti|
|00004550| 6e 67 20 74 68 65 20 73 | 74 72 69 6e 67 29 2e 0d |ng the s|tring)..|
|00004560| 0d 76 6f 69 64 20 52 65 | 73 69 7a 65 28 46 57 5f |.void Re|size(FW_|
|00004570| 43 68 61 72 61 63 74 65 | 72 43 6f 75 6e 74 20 6e |Characte|rCount n|
|00004580| 65 77 43 61 70 61 63 69 | 74 79 29 3b 0d 0d 53 65 |ewCapaci|ty);..Se|
|00004590| 74 20 74 68 65 20 73 69 | 7a 65 20 6f 66 20 74 68 |t the si|ze of th|
|000045a0| 65 20 63 75 72 72 65 6e | 74 20 73 74 72 69 6e 67 |e curren|t string|
|000045b0| 20 74 6f 20 74 68 65 20 | 6e 65 77 43 61 70 61 63 | to the |newCapac|
|000045c0| 69 74 79 20 76 61 6c 75 | 65 2e 0d 46 57 5f 43 4d |ity valu|e..FW_CM|
|000045d0| 65 6d 6f 72 79 52 65 61 | 64 65 72 20 63 6c 61 73 |emoryRea|der clas|
|000045e0| 73 0d 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e 0d 46 |s.Introd|uction.F|
|000045f0| 57 5f 43 4d 65 6d 6f 72 | 79 52 65 61 64 65 72 20 |W_CMemor|yReader |
|00004600| 6f 62 6a 65 63 74 20 72 | 65 61 64 73 20 74 68 65 |object r|eads the|
|00004610| 20 63 6f 6e 74 65 6e 74 | 20 6f 66 20 61 20 74 65 | content| of a te|
|00004620| 78 74 20 62 75 66 66 65 | 72 2e 20 49 74 20 69 6e |xt buffe|r. It in|
|00004630| 68 65 72 69 74 73 20 69 | 74 73 20 70 72 6f 74 6f |herits i|ts proto|
|00004640| 63 6f 6c 20 66 72 6f 6d | 20 46 57 5f 43 54 65 78 |col from| FW_CTex|
|00004650| 74 52 65 61 64 65 72 2e | 20 54 65 78 74 20 52 65 |tReader.| Text Re|
|00004660| 61 64 65 72 73 20 61 72 | 65 20 75 73 65 64 20 74 |aders ar|e used t|
|00004670| 6f 20 70 72 6f 76 69 64 | 65 20 61 20 63 6f 6d 6d |o provid|e a comm|
|00004680| 6f 6e 20 69 6e 74 65 72 | 66 61 63 65 20 66 6f 72 |on inter|face for|
|00004690| 20 74 6f 6f 6c 73 20 74 | 68 61 74 20 6f 70 65 72 | tools t|hat oper|
|000046a0| 61 74 65 20 6f 6e 20 74 | 65 78 74 2e 0d 48 65 61 |ate on t|ext..Hea|
|000046b0| 64 65 72 20 46 69 6c 65 | 0d 46 57 43 68 61 72 49 |der File|.FWCharI|
|000046c0| 74 2e 68 0d 48 65 72 69 | 74 61 67 65 0d 46 57 5f |t.h.Heri|tage.FW_|
|000046d0| 43 54 65 78 74 52 65 61 | 64 65 72 09 35 31 0d a5 |CTextRea|der.51..|
|000046e0| 46 57 5f 43 4d 65 6d 6f | 72 79 52 65 61 64 65 72 |FW_CMemo|ryReader|
|000046f0| 0d a5 46 57 5f 43 53 74 | 72 69 6e 67 52 65 61 64 |..FW_CSt|ringRead|
|00004700| 65 72 09 33 37 0d 55 73 | 69 6e 67 20 46 57 5f 43 |er.37.Us|ing FW_C|
|00004710| 4d 65 6d 6f 72 79 52 65 | 61 64 65 72 0d 59 6f 75 |MemoryRe|ader.You|
|00004720| 20 6d 61 79 20 63 72 65 | 61 74 65 20 61 20 46 57 | may cre|ate a FW|
|00004730| 5f 43 4d 65 6d 6f 72 79 | 52 65 61 64 65 72 20 6f |_CMemory|Reader o|
|00004740| 62 6a 65 63 74 20 74 6f | 20 72 65 61 64 20 6f 76 |bject to| read ov|
|00004750| 65 72 20 61 6e 79 20 74 | 65 78 74 20 64 61 74 61 |er any t|ext data|
|00004760| 20 73 74 72 75 63 74 75 | 72 65 20 69 6e 20 6d 65 | structu|re in me|
|00004770| 6d 6f 72 79 2c 20 61 73 | 20 6c 6f 6e 67 20 61 73 |mory, as| long as|
|00004780| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | the fol|lowing c|
|00004790| 6f 6e 73 74 72 61 69 6e | 74 73 20 61 72 65 20 6d |onstrain|ts are m|
|000047a0| 65 74 3a 0d 09 31 2e 09 | 59 6f 75 20 6d 75 73 74 |et:..1..|You must|
|000047b0| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 67 65 74 20 | be able| to get |
|000047c0| 74 68 65 20 74 6f 74 61 | 6c 20 6e 75 6d 62 65 72 |the tota|l number|
|000047d0| 20 6f 66 20 63 68 61 72 | 61 63 74 65 72 73 20 69 | of char|acters i|
|000047e0| 6e 20 74 68 65 20 64 61 | 74 61 20 73 74 72 75 63 |n the da|ta struc|
|000047f0| 74 75 72 65 2e 0d 0d 59 | 6f 75 20 6d 75 73 74 20 |ture...Y|ou must |
|00004800| 6f 76 65 72 72 69 64 65 | 20 74 68 65 20 76 69 72 |override| the vir|
|00004810| 74 75 61 6c 20 6d 65 74 | 68 6f 64 20 47 65 74 4c |tual met|hod GetL|
|00004820| 65 6e 67 74 68 28 29 20 | 74 6f 20 72 65 74 75 72 |ength() |to retur|
|00004830| 6e 20 74 68 65 20 63 6f | 72 72 65 63 74 20 76 61 |n the co|rrect va|
|00004840| 6c 75 65 2e 20 49 66 20 | 69 74 20 69 73 20 65 78 |lue. If |it is ex|
|00004850| 70 65 6e 73 69 76 65 20 | 74 6f 20 63 61 6c 6c 20 |pensive |to call |
|00004860| 47 65 74 4c 65 6e 67 74 | 68 20 6f 6e 20 74 68 65 |GetLengt|h on the|
|00004870| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 2c | data st|ructure,|
|00004880| 20 73 75 62 63 6c 61 73 | 73 65 73 20 6d 61 79 20 | subclas|ses may |
|00004890| 77 61 6e 74 20 74 6f 20 | 63 6f 6d 70 75 74 65 20 |want to |compute |
|000048a0| 74 68 65 20 6c 65 6e 67 | 74 68 20 6f 6e 63 65 20 |the leng|th once |
|000048b0| 69 6e 20 74 68 65 20 63 | 6f 6e 73 74 72 75 63 74 |in the c|onstruct|
|000048c0| 6f 72 2c 20 61 6e 64 20 | 74 68 65 6e 20 63 61 63 |or, and |then cac|
|000048d0| 68 65 20 74 68 65 20 72 | 65 73 75 6c 74 20 61 73 |he the r|esult as|
|000048e0| 20 61 20 6e 65 77 20 64 | 61 74 61 20 6d 65 6d 62 | a new d|ata memb|
|000048f0| 65 72 2c 20 77 68 69 63 | 68 20 47 65 74 4c 65 6e |er, whic|h GetLen|
|00004900| 67 74 68 20 77 6f 75 6c | 64 20 72 65 74 75 72 6e |gth woul|d return|
|00004910| 2e 20 54 68 69 73 20 61 | 73 73 75 6d 65 73 20 74 |. This a|ssumes t|
|00004920| 68 61 74 20 74 68 65 20 | 6c 65 6e 67 74 68 20 61 |hat the |length a|
|00004930| 6e 64 20 63 6f 6e 74 65 | 6e 74 20 6f 66 20 74 68 |nd conte|nt of th|
|00004940| 65 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |e data s|tructure|
|00004950| 20 64 6f 65 73 20 6e 6f | 74 20 63 68 61 6e 67 65 | does no|t change|
|00004960| 20 77 68 69 6c 65 20 74 | 68 65 20 69 74 65 72 61 | while t|he itera|
|00004970| 74 6f 72 20 69 73 20 62 | 65 69 6e 67 20 75 73 65 |tor is b|eing use|
|00004980| 64 2e 20 0d 09 32 2e 09 | 54 68 65 20 64 61 74 61 |d. ..2..|The data|
|00004990| 20 6d 65 6d 62 65 72 73 | 20 66 53 74 61 72 74 2c | members| fStart,|
|000049a0| 20 66 4c 69 6d 69 74 2c | 20 61 6e 64 20 66 4e 65 | fLimit,| and fNe|
|000049b0| 78 74 20 61 72 65 20 75 | 70 64 61 74 65 64 2e 20 |xt are u|pdated. |
|000049c0| 0d 46 57 5f 43 4d 65 6d | 6f 72 79 52 65 61 64 65 |.FW_CMem|oryReade|
|000049d0| 72 20 74 61 73 6b 73 0d | 54 68 69 73 20 63 6c 61 |r tasks.|This cla|
|000049e0| 73 73 20 72 65 61 64 73 | 20 74 68 65 20 63 6f 6e |ss reads| the con|
|000049f0| 74 65 6e 74 73 20 6f 66 | 20 61 6e 79 20 74 65 78 |tents of| any tex|
|00004a00| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|00004a10| 20 69 6e 20 6d 65 6d 6f | 72 79 20 77 69 74 68 6f | in memo|ry witho|
|00004a20| 75 74 20 6b 6e 6f 77 69 | 6e 67 20 74 68 65 20 69 |ut knowi|ng the i|
|00004a30| 6e 74 65 72 6e 61 6c 73 | 20 6f 66 20 74 68 65 20 |nternals| of the |
|00004a40| 74 65 78 74 20 64 61 74 | 61 20 73 74 72 75 63 74 |text dat|a struct|
|00004a50| 75 72 65 2c 20 6f 72 20 | 74 68 65 20 70 75 62 6c |ure, or |the publ|
|00004a60| 69 63 20 70 72 6f 74 6f | 63 6f 6c 20 64 65 66 69 |ic proto|col defi|
|00004a70| 6e 65 64 20 64 69 72 65 | 63 74 6c 79 20 62 79 20 |ned dire|ctly by |
|00004a80| 74 68 65 20 74 65 78 74 | 20 64 61 74 61 20 73 74 |the text| data st|
|00004a90| 72 75 63 74 75 72 65 2e | 0d 50 65 72 66 6f 72 6d |ructure.|.Perform|
|00004aa0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 73 | the fol|lowing s|
|00004ab0| 74 65 70 73 20 74 6f 20 | 75 73 65 20 74 68 69 73 |teps to |use this|
|00004ac0| 20 63 6c 61 73 73 3a 0d | 09 31 2e 09 49 6e 73 74 | class:.|.1..Inst|
|00004ad0| 61 6e 74 69 61 74 65 20 | 61 20 46 57 5f 43 4d 65 |antiate |a FW_CMe|
|00004ae0| 6d 6f 72 79 52 65 61 64 | 65 72 20 6f 62 6a 65 63 |moryRead|er objec|
|00004af0| 74 2e 0d 09 32 2e 09 57 | 72 69 74 65 20 61 20 6c |t...2..W|rite a l|
|00004b00| 6f 6f 70 20 74 68 61 74 | 20 75 73 65 73 20 74 68 |oop that| uses th|
|00004b10| 65 20 47 65 74 43 68 61 | 72 61 63 74 65 72 41 6e |e GetCha|racterAn|
|00004b20| 64 20 41 64 76 61 6e 63 | 65 28 29 20 6d 65 74 68 |d Advanc|e() meth|
|00004b30| 6f 64 20 74 6f 20 72 65 | 61 64 20 65 61 63 68 20 |od to re|ad each |
|00004b40| 63 68 61 72 61 63 74 65 | 72 20 6f 66 20 74 68 65 |characte|r of the|
|00004b50| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 2e | data st|ructure.|
|00004b60| 20 47 65 74 43 68 61 72 | 61 63 74 65 72 41 6e 64 | GetChar|acterAnd|
|00004b70| 41 64 76 61 6e 63 65 28 | 29 20 72 65 74 75 72 6e |Advance(|) return|
|00004b80| 73 20 46 57 5f 6b 4e 75 | 6c 43 68 61 72 61 63 74 |s FW_kNu|lCharact|
|00004b90| 65 72 20 77 68 65 6e 20 | 61 6c 6c 20 6f 66 20 74 |er when |all of t|
|00004ba0| 68 65 20 63 68 61 72 61 | 63 74 65 72 73 20 68 61 |he chara|cters ha|
|00004bb0| 76 65 20 62 65 65 6e 20 | 72 65 61 64 2e 0d 4d 6f |ve been |read..Mo|
|00004bc0| 72 65 20 73 6f 70 68 69 | 73 74 69 63 61 74 65 64 |re sophi|sticated|
|00004bd0| 20 75 73 65 73 20 61 72 | 65 20 70 6f 73 73 69 62 | uses ar|e possib|
|00004be0| 6c 65 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |le. For |example,|
|00004bf0| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 50 65 65 | you can| use Pee|
|00004c00| 6b 43 68 61 72 61 63 74 | 65 72 20 74 6f 20 69 64 |kCharact|er to id|
|00004c10| 65 6e 74 69 66 79 20 74 | 68 65 20 6e 65 78 74 20 |entify t|he next |
|00004c20| 63 68 61 72 61 63 74 65 | 72 20 77 69 74 68 6f 75 |characte|r withou|
|00004c30| 74 20 61 64 76 61 6e 63 | 69 6e 67 20 70 61 73 74 |t advanc|ing past|
|00004c40| 20 69 74 2e 20 54 68 69 | 73 20 63 61 6e 20 62 65 | it. Thi|s can be|
|00004c50| 20 75 73 65 66 75 6c 20 | 77 68 65 6e 20 6f 6e 65 | useful |when one|
|00004c60| 20 63 68 61 72 61 63 74 | 65 72 20 6c 6f 6f 6b 61 | charact|er looka|
|00004c70| 68 65 61 64 20 69 73 20 | 6e 65 65 64 65 64 2e 20 |head is |needed. |
|00004c80| 49 74 20 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |It is po|ssible t|
|00004c90| 6f 20 d2 73 65 65 6b d3 | 20 74 6f 20 61 20 67 69 |o .seek.| to a gi|
|00004ca0| 76 65 6e 20 70 6f 73 69 | 74 69 6f 6e 20 69 6e 20 |ven posi|tion in |
|00004cb0| 74 68 65 20 74 65 78 74 | 20 64 61 74 61 20 73 74 |the text| data st|
|00004cc0| 72 75 63 74 75 72 65 2e | 0d 53 75 62 63 6c 61 73 |ructure.|.Subclas|
|00004cd0| 73 69 6e 67 20 46 57 5f | 43 4d 65 6d 6f 72 79 52 |sing FW_|CMemoryR|
|00004ce0| 65 61 64 65 72 0d 54 68 | 69 73 20 63 6c 61 73 73 |eader.Th|is class|
|00004cf0| 20 69 73 20 6e 6f 74 20 | 6e 6f 72 6d 61 6c 6c 79 | is not |normally|
|00004d00| 20 73 75 62 63 6c 61 73 | 73 65 64 2e 0d 4f 76 65 | subclas|sed..Ove|
|00004d10| 72 72 69 64 69 6e 67 20 | 4d 65 74 68 6f 64 73 0d |rriding |Methods.|
|00004d20| 46 57 5f 43 54 65 78 74 | 52 65 61 64 65 72 20 64 |FW_CText|Reader d|
|00004d30| 65 66 69 6e 65 73 20 74 | 68 72 65 65 20 70 75 72 |efines t|hree pur|
|00004d40| 65 20 76 69 72 74 75 61 | 6c 20 6d 65 74 68 6f 64 |e virtua|l method|
|00004d50| 73 20 77 68 69 63 68 20 | 6d 75 73 74 20 62 65 20 |s which |must be |
|00004d60| 6f 76 65 72 72 69 64 64 | 65 6e 20 69 6e 20 74 68 |overridd|en in th|
|00004d70| 69 73 20 63 6c 61 73 73 | 2e 20 41 6c 6c 20 6f 66 |is class|. All of|
|00004d80| 20 74 68 65 20 6f 74 68 | 65 72 20 6d 65 74 68 6f | the oth|er metho|
|00004d90| 64 73 20 61 72 65 20 6e | 6f 6e 2d 76 69 72 74 75 |ds are n|on-virtu|
|00004da0| 61 6c 2e 20 54 68 65 20 | 74 68 72 65 65 20 76 69 |al. The |three vi|
|00004db0| 72 74 75 61 6c 20 6d 65 | 74 68 6f 64 73 20 61 72 |rtual me|thods ar|
|00004dc0| 65 20 47 65 74 4c 65 6e | 67 74 68 28 29 2c 20 44 |e GetLen|gth(), D|
|00004dd0| 6f 47 65 74 4e 65 78 74 | 42 75 66 66 65 72 28 29 |oGetNext|Buffer()|
|00004de0| 2c 20 61 6e 64 20 44 6f | 47 65 74 50 72 65 76 69 |, and Do|GetPrevi|
|00004df0| 6f 75 73 42 75 66 66 65 | 72 28 29 2e 0d 49 6e 73 |ousBuffe|r()..Ins|
|00004e00| 74 61 6e 74 69 61 74 69 | 6e 67 20 46 57 5f 43 4d |tantiati|ng FW_CM|
|00004e10| 65 6d 6f 72 79 52 65 61 | 64 65 72 0d 49 6e 73 74 |emoryRea|der.Inst|
|00004e20| 61 6e 74 69 61 74 65 20 | 61 20 46 57 5f 43 4d 65 |antiate |a FW_CMe|
|00004e30| 6d 6f 72 79 52 65 61 64 | 65 72 20 6f 62 6a 65 63 |moryRead|er objec|
|00004e40| 74 20 77 68 65 6e 65 76 | 65 72 20 79 6f 75 20 6e |t whenev|er you n|
|00004e50| 65 65 64 20 74 6f 20 72 | 65 61 64 20 61 20 73 74 |eed to r|ead a st|
|00004e60| 72 69 6e 67 20 64 61 74 | 61 20 73 74 72 75 63 74 |ring dat|a struct|
|00004e70| 75 72 65 20 66 72 6f 6d | 20 61 20 6d 65 6d 6f 72 |ure from| a memor|
|00004e80| 79 20 62 75 66 66 65 72 | 2e 0d 46 57 5f 43 4d 65 |y buffer|..FW_CMe|
|00004e90| 6d 6f 72 79 52 65 61 64 | 65 72 20 4d 65 74 68 6f |moryRead|er Metho|
|00004ea0| 64 73 0d 0d 46 57 5f 43 | 4d 65 6d 6f 72 79 52 65 |ds..FW_C|MemoryRe|
|00004eb0| 61 64 65 72 28 63 6f 6e | 73 74 20 46 57 5f 42 79 |ader(con|st FW_By|
|00004ec0| 74 65 20 2a 20 62 75 66 | 66 65 72 2c 0d 09 09 09 |te * buf|fer,....|
|00004ed0| 09 09 20 20 46 57 5f 42 | 79 74 65 43 6f 75 6e 74 |.. FW_B|yteCount|
|00004ee0| 20 62 79 74 65 73 29 3b | 0d 0d 43 6f 6e 73 74 72 | bytes);|..Constr|
|00004ef0| 75 63 74 6f 72 20 69 6e | 73 74 61 6e 74 69 61 74 |uctor in|stantiat|
|00004f00| 65 73 20 61 20 46 57 5f | 43 4d 65 6d 6f 72 79 52 |es a FW_|CMemoryR|
|00004f10| 65 61 64 65 72 20 6f 62 | 6a 65 63 74 20 62 79 74 |eader ob|ject byt|
|00004f20| 65 73 20 69 6e 20 6c 65 | 6e 67 74 68 2c 20 61 6e |es in le|ngth, an|
|00004f30| 64 20 63 6f 70 69 65 73 | 20 74 68 65 20 63 6f 6e |d copies| the con|
|00004f40| 74 65 6e 74 73 20 6f 66 | 20 62 75 66 66 65 72 20 |tents of| buffer |
|00004f50| 69 6e 74 6f 20 69 74 2e | 0d 0d 46 57 5f 43 4d 65 |into it.|..FW_CMe|
|00004f60| 6d 6f 72 79 52 65 61 64 | 65 72 28 63 6f 6e 73 74 |moryRead|er(const|
|00004f70| 20 46 57 5f 43 68 61 72 | 20 2a 20 62 75 66 66 65 | FW_Char| * buffe|
|00004f80| 72 2c 0d 09 09 09 09 09 | 20 20 46 57 5f 43 68 61 |r,......| FW_Cha|
|00004f90| 72 61 63 74 65 72 43 6f | 75 6e 74 20 63 68 61 72 |racterCo|unt char|
|00004fa0| 61 63 74 65 72 73 29 3b | 0d 0d 43 6f 6e 73 74 72 |acters);|..Constr|
|00004fb0| 75 63 74 6f 72 20 69 6e | 73 74 61 6e 74 69 61 74 |uctor in|stantiat|
|00004fc0| 65 73 20 61 20 46 57 5f | 43 4d 65 6d 6f 72 79 52 |es a FW_|CMemoryR|
|00004fd0| 65 61 64 65 72 20 6f 62 | 6a 65 63 74 20 20 63 68 |eader ob|ject ch|
|00004fe0| 61 72 61 63 74 65 72 73 | 20 69 6e 20 6c 65 6e 67 |aracters| in leng|
|00004ff0| 74 68 2c 20 61 6e 64 20 | 63 6f 70 69 65 73 20 74 |th, and |copies t|
|00005000| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 62 |he conte|nts of b|
|00005010| 75 66 66 65 72 20 69 6e | 74 6f 20 69 74 2e 0d 0d |uffer in|to it...|
|00005020| 0d 7e 46 57 5f 43 4d 65 | 6d 6f 72 79 52 65 61 64 |.~FW_CMe|moryRead|
|00005030| 65 72 28 29 3b 0d 0d 45 | 6d 70 74 79 20 64 65 73 |er();..E|mpty des|
|00005040| 74 72 75 63 74 6f 72 2e | 0d 0d 76 69 72 74 75 61 |tructor.|..virtua|
|00005050| 6c 20 76 6f 69 64 20 44 | 6f 47 65 74 4e 65 78 74 |l void D|oGetNext|
|00005060| 42 75 66 66 65 72 28 29 | 3b 0d 0d 47 65 74 73 20 |Buffer()|;..Gets |
|00005070| 61 6e 6f 74 68 65 72 20 | 62 75 66 66 65 72 20 66 |another |buffer f|
|00005080| 72 6f 6d 20 74 65 78 74 | 20 64 61 74 61 20 73 74 |rom text| data st|
|00005090| 72 75 63 74 75 72 65 20 | 61 6e 64 20 75 70 64 61 |ructure |and upda|
|000050a0| 74 65 73 20 66 53 74 61 | 72 74 20 61 6e 64 20 66 |tes fSta|rt and f|
|000050b0| 4c 69 6d 69 74 2e 20 54 | 68 69 73 20 69 73 20 61 |Limit. T|his is a|
|000050c0| 20 70 72 6f 74 65 63 74 | 65 64 20 6d 65 74 68 6f | protect|ed metho|
|000050d0| 64 2e 0d 59 6f 75 20 6d | 75 73 74 20 65 6e 73 75 |d..You m|ust ensu|
|000050e0| 72 65 20 74 68 61 74 20 | 66 53 74 61 72 74 20 69 |re that |fStart i|
|000050f0| 73 20 6c 65 73 73 20 74 | 68 61 6e 20 66 4c 69 6d |s less t|han fLim|
|00005100| 69 74 2e 0d 0d 76 69 72 | 74 75 61 6c 20 76 6f 69 |it...vir|tual voi|
|00005110| 64 20 44 6f 47 65 74 50 | 72 65 76 69 6f 75 73 42 |d DoGetP|reviousB|
|00005120| 75 66 66 65 72 28 29 3b | 0d 0d 49 6e 74 65 6e 64 |uffer();|..Intend|
|00005130| 65 64 20 74 6f 20 67 65 | 74 20 74 68 65 20 70 72 |ed to ge|t the pr|
|00005140| 65 76 69 6f 75 73 20 62 | 75 66 66 65 72 20 66 72 |evious b|uffer fr|
|00005150| 6f 6d 20 74 68 65 20 74 | 65 78 74 20 64 61 74 61 |om the t|ext data|
|00005160| 20 73 74 72 75 63 74 75 | 72 65 2e 20 55 70 64 61 | structu|re. Upda|
|00005170| 74 65 73 20 66 53 74 61 | 72 74 20 61 6e 64 20 66 |tes fSta|rt and f|
|00005180| 4c 69 6d 69 74 2e 20 59 | 6f 75 20 6d 75 73 74 20 |Limit. Y|ou must |
|00005190| 65 6e 73 75 72 65 20 74 | 68 61 74 20 66 53 74 61 |ensure t|hat fSta|
|000051a0| 72 74 20 69 73 20 6c 65 | 73 73 20 74 68 61 6e 20 |rt is le|ss than |
|000051b0| 66 4c 69 6d 69 74 2e 20 | 54 68 69 73 20 69 73 20 |fLimit. |This is |
|000051c0| 61 20 70 72 6f 74 65 63 | 74 65 64 20 6d 65 74 68 |a protec|ted meth|
|000051d0| 6f 64 2e 0d 46 57 5f 43 | 4d 65 6d 6f 72 79 57 72 |od..FW_C|MemoryWr|
|000051e0| 69 74 65 72 20 63 6c 61 | 73 73 0d 49 6e 74 72 6f |iter cla|ss.Intro|
|000051f0| 64 75 63 74 69 6f 6e 0d | 41 20 46 57 5f 43 4d 65 |duction.|A FW_CMe|
|00005200| 6d 6f 72 79 57 72 69 74 | 65 72 20 6f 62 6a 65 63 |moryWrit|er objec|
|00005210| 74 20 77 72 69 74 65 73 | 20 64 61 74 61 20 74 6f |t writes| data to|
|00005220| 20 61 20 62 75 66 66 65 | 72 2e 20 0d 41 20 46 57 | a buffe|r. .A FW|
|00005230| 5f 43 4d 65 6d 6f 72 79 | 57 72 69 74 65 72 20 6f |_CMemory|Writer o|
|00005240| 62 6a 65 63 74 20 69 73 | 20 61 6e 20 69 74 65 72 |bject is| an iter|
|00005250| 61 74 6f 72 20 61 74 74 | 61 63 68 65 64 20 74 6f |ator att|ached to|
|00005260| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 74 65 | a parti|cular te|
|00005270| 78 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |xt data |structur|
|00005280| 65 20 77 68 65 6e 20 69 | 74 20 69 73 20 63 6f 6e |e when i|t is con|
|00005290| 73 74 72 75 63 74 65 64 | 2e 20 49 74 20 6d 61 69 |structed|. It mai|
|000052a0| 6e 74 61 69 6e 73 20 73 | 74 61 74 65 20 69 6e 66 |ntains s|tate inf|
|000052b0| 6f 72 6d 61 74 69 6f 6e | 20 66 6f 72 20 68 6f 77 |ormation| for how|
|000052c0| 20 6d 75 63 68 20 6f 66 | 20 74 68 65 20 74 65 78 | much of| the tex|
|000052d0| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|000052e0| 20 68 61 73 20 62 65 65 | 6e 20 77 72 69 74 74 65 | has bee|n writte|
|000052f0| 6e 2e 0d 48 65 61 64 65 | 72 20 46 69 6c 65 0d 46 |n..Heade|r File.F|
|00005300| 57 43 68 61 72 6c 74 2e | 68 0d 48 65 72 69 74 61 |WCharlt.|h.Herita|
|00005310| 67 65 0d 46 57 5f 43 54 | 65 78 74 57 72 69 74 65 |ge.FW_CT|extWrite|
|00005320| 72 09 35 37 0d a5 46 57 | 5f 43 4d 65 6d 6f 72 79 |r.57..FW|_CMemory|
|00005330| 57 72 69 74 65 72 0d a5 | 46 57 5f 43 53 74 72 69 |Writer..|FW_CStri|
|00005340| 6e 67 57 72 69 74 65 72 | 09 34 39 0d 55 73 69 6e |ngWriter|.49.Usin|
|00005350| 67 20 46 57 5f 43 4d 65 | 6d 6f 72 79 57 72 69 74 |g FW_CMe|moryWrit|
|00005360| 65 72 0d 54 68 69 73 20 | 63 6c 61 73 73 20 69 73 |er.This |class is|
|00005370| 20 61 20 74 65 78 74 77 | 72 69 74 65 72 20 73 75 | a textw|riter su|
|00005380| 62 63 6c 61 73 73 2c 20 | 75 73 65 64 20 74 6f 20 |bclass, |used to |
|00005390| 77 72 69 74 65 20 69 6e | 74 6f 20 61 20 62 75 66 |write in|to a buf|
|000053a0| 66 65 72 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |fer of c|haracter|
|000053b0| 73 2e 20 49 74 20 68 61 | 73 20 6e 6f 20 73 75 62 |s. It ha|s no sub|
|000053c0| 63 6c 61 73 73 65 73 2e | 20 54 6f 20 75 73 65 20 |classes.| To use |
|000053d0| 74 68 69 73 20 63 6c 61 | 73 73 2c 20 6f 76 65 72 |this cla|ss, over|
|000053e0| 72 69 64 65 20 44 6f 46 | 6c 75 73 68 41 6e 64 47 |ride DoF|lushAndG|
|000053f0| 65 74 4e 65 78 74 42 75 | 66 66 65 72 20 61 6e 64 |etNextBu|ffer and|
|00005400| 20 69 6e 73 74 61 6e 74 | 69 61 74 65 20 61 20 63 | instant|iate a c|
|00005410| 6c 61 73 73 20 6f 62 6a | 65 63 74 2e 0d 52 65 6c |lass obj|ect..Rel|
|00005420| 61 74 65 64 20 43 6c 61 | 73 73 65 73 0d 46 57 5f |ated Cla|sses.FW_|
|00005430| 43 54 65 78 74 57 72 69 | 74 65 72 20 64 65 66 69 |CTextWri|ter defi|
|00005440| 6e 65 73 20 63 6f 6e 63 | 72 65 74 65 20 63 6c 61 |nes conc|rete cla|
|00005450| 73 73 65 73 20 77 68 69 | 63 68 20 63 72 65 61 74 |sses whi|ch creat|
|00005460| 65 20 6f 62 6a 65 63 74 | 73 20 61 6e 64 20 77 72 |e object|s and wr|
|00005470| 69 74 65 73 20 64 61 74 | 61 20 73 74 6f 72 65 64 |ites dat|a stored|
|00005480| 20 69 6e 20 74 65 78 74 | 20 6f 62 6a 65 63 74 73 | in text| objects|
|00005490| 2e 20 46 57 5f 43 54 65 | 78 74 52 65 61 64 65 72 |. FW_CTe|xtReader|
|000054a0| 20 72 65 61 64 73 20 74 | 68 61 74 20 64 61 74 61 | reads t|hat data|
|000054b0| 2e 20 46 57 5f 54 53 74 | 72 69 6e 67 54 6f 6f 6c |. FW_TSt|ringTool|
|000054c0| 20 70 72 6f 76 69 64 65 | 73 20 74 6f 6f 6c 73 20 | provide|s tools |
|000054d0| 77 68 69 63 68 20 61 63 | 74 20 74 68 72 6f 75 67 |which ac|t throug|
|000054e0| 68 20 46 57 5f 43 54 65 | 78 74 52 65 61 64 65 72 |h FW_CTe|xtReader|
|000054f0| 20 61 6e 64 20 46 57 5f | 43 54 65 78 74 57 72 69 | and FW_|CTextWri|
|00005500| 74 65 72 20 6f 6e 20 74 | 68 65 73 65 20 6f 62 6a |ter on t|hese obj|
|00005510| 65 63 74 73 2e 20 0d 53 | 75 62 63 6c 61 73 73 69 |ects. .S|ubclassi|
|00005520| 6e 67 20 46 57 5f 43 4d | 65 6d 6f 72 79 57 72 69 |ng FW_CM|emoryWri|
|00005530| 74 65 72 0d 54 68 69 73 | 20 63 6c 61 73 73 20 69 |ter.This| class i|
|00005540| 73 20 6e 6f 74 20 6e 6f | 72 6d 61 6c 6c 79 20 73 |s not no|rmally s|
|00005550| 75 62 63 6c 61 73 73 65 | 64 2e 0d 4f 76 65 72 72 |ubclasse|d..Overr|
|00005560| 69 64 69 6e 67 20 4d 65 | 74 68 6f 64 73 0d 46 57 |iding Me|thods.FW|
|00005570| 5f 43 4d 65 6d 6f 72 79 | 52 65 61 64 65 72 20 64 |_CMemory|Reader d|
|00005580| 65 66 69 6e 65 73 20 6f | 6e 65 20 70 75 72 65 20 |efines o|ne pure |
|00005590| 76 69 72 74 75 61 6c 20 | 6d 65 74 68 6f 64 20 77 |virtual |method w|
|000055a0| 68 69 63 68 20 6d 75 73 | 74 20 62 65 20 6f 76 65 |hich mus|t be ove|
|000055b0| 72 72 69 64 64 65 6e 2e | 20 41 6c 6c 20 6f 66 20 |rridden.| All of |
|000055c0| 74 68 65 20 6f 74 68 65 | 72 20 6d 65 74 68 6f 64 |the othe|r method|
|000055d0| 73 20 61 72 65 20 6e 6f | 6e 2d 76 69 72 74 75 61 |s are no|n-virtua|
|000055e0| 6c 2e 20 54 68 65 20 70 | 75 72 65 20 76 69 72 74 |l. The p|ure virt|
|000055f0| 75 61 6c 20 6d 65 74 68 | 6f 64 20 69 73 20 44 6f |ual meth|od is Do|
|00005600| 46 6c 75 73 68 41 6e 64 | 47 65 74 4e 65 78 74 42 |FlushAnd|GetNextB|
|00005610| 75 66 66 65 72 28 29 2e | 0d 49 6e 73 74 61 6e 74 |uffer().|.Instant|
|00005620| 69 61 74 69 6e 67 20 46 | 57 5f 43 4d 65 6d 6f 72 |iating F|W_CMemor|
|00005630| 79 57 72 69 74 65 72 0d | 49 6e 73 74 61 6e 74 69 |yWriter.|Instanti|
|00005640| 61 74 65 20 61 20 46 57 | 5f 43 4d 65 6d 6f 72 79 |ate a FW|_CMemory|
|00005650| 57 72 69 74 65 72 20 6f | 62 6a 65 63 74 20 77 68 |Writer o|bject wh|
|00005660| 65 6e 65 76 65 72 20 79 | 6f 75 20 77 61 6e 74 20 |enever y|ou want |
|00005670| 74 6f 20 77 72 69 74 65 | 20 74 65 78 74 20 74 6f |to write| text to|
|00005680| 20 61 20 6d 65 6d 6f 72 | 79 20 62 75 66 66 65 72 | a memor|y buffer|
|00005690| 2e 0d 46 57 5f 43 4d 65 | 6d 6f 72 79 57 72 69 74 |..FW_CMe|moryWrit|
|000056a0| 65 72 20 4d 65 74 68 6f | 64 73 0d 0d 46 57 5f 43 |er Metho|ds..FW_C|
|000056b0| 4d 65 6d 6f 72 79 57 72 | 69 74 65 72 28 46 57 5f |MemoryWr|iter(FW_|
|000056c0| 42 79 74 65 20 2a 20 62 | 75 66 66 65 72 2c 20 0d |Byte * b|uffer, .|
|000056d0| 09 09 09 09 09 20 20 46 | 57 5f 42 79 74 65 43 6f |..... F|W_ByteCo|
|000056e0| 75 6e 74 20 63 61 70 61 | 63 69 74 79 29 3b 0d 0d |unt capa|city);..|
|000056f0| 43 6f 6e 73 74 72 75 63 | 74 6f 72 20 69 6e 73 74 |Construc|tor inst|
|00005700| 61 6e 74 69 61 74 65 73 | 20 61 20 46 57 5f 43 4d |antiates| a FW_CM|
|00005710| 65 6d 6f 72 79 57 72 69 | 74 65 72 20 6f 62 6a 65 |emoryWri|ter obje|
|00005720| 63 74 2e 20 0d 0d 76 69 | 72 74 75 61 6c 20 7e 46 |ct. ..vi|rtual ~F|
|00005730| 57 5f 43 4d 65 6d 6f 72 | 79 57 72 69 74 65 72 28 |W_CMemor|yWriter(|
|00005740| 29 3b 0d 0d 45 6d 70 74 | 79 20 64 65 73 74 72 75 |);..Empt|y destru|
|00005750| 63 74 6f 72 2e 0d 0d 76 | 69 72 74 75 61 6c 20 76 |ctor...v|irtual v|
|00005760| 6f 69 64 20 44 6f 46 6c | 75 73 68 41 6e 64 47 65 |oid DoFl|ushAndGe|
|00005770| 74 4e 65 78 74 42 75 66 | 66 65 72 28 29 3b 0d 0d |tNextBuf|fer();..|
|00005780| 46 6c 75 73 68 20 74 68 | 65 20 63 75 72 72 65 6e |Flush th|e curren|
|00005790| 74 20 62 75 66 66 65 72 | 2e 20 54 68 69 73 20 69 |t buffer|. This i|
|000057a0| 73 20 61 20 70 72 6f 74 | 65 63 74 65 64 20 6d 65 |s a prot|ected me|
|000057b0| 74 68 6f 64 2e 0d 46 57 | 5f 43 4d 69 6e 69 6d 61 |thod..FW|_CMinima|
|000057c0| 6c 53 74 72 69 6e 67 54 | 6f 6f 6c 20 63 6c 61 73 |lStringT|ool clas|
|000057d0| 73 0d 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e 0d 46 |s.Introd|uction.F|
|000057e0| 57 5f 43 4d 69 6e 69 6d | 61 6c 53 74 72 69 6e 67 |W_CMinim|alString|
|000057f0| 54 6f 6f 6c 20 69 73 20 | 61 6e 20 61 62 73 74 72 |Tool is |an abstr|
|00005800| 61 63 74 20 62 61 73 65 | 20 63 6c 61 73 73 20 77 |act base| class w|
|00005810| 68 69 63 68 20 70 72 6f | 76 69 64 65 73 20 61 20 |hich pro|vides a |
|00005820| 73 69 6d 70 6c 69 66 69 | 65 64 2c 20 71 75 69 63 |simplifi|ed, quic|
|00005830| 6b 20 61 6e 64 20 63 6f | 6e 76 65 6e 69 65 6e 74 |k and co|nvenient|
|00005840| 20 69 6e 74 65 72 66 61 | 63 65 20 74 6f 20 74 65 | interfa|ce to te|
|00005850| 78 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |xt data |structur|
|00005860| 65 73 20 66 6f 72 20 70 | 72 6f 63 65 73 73 65 73 |es for p|rocesses|
|00005870| 20 77 68 69 63 68 20 64 | 6f 6e d5 74 20 72 65 71 | which d|on.t req|
|00005880| 75 69 72 65 20 63 6f 6d | 70 6c 65 74 65 20 64 61 |uire com|plete da|
|00005890| 74 61 20 68 61 6e 64 6c | 69 6e 67 20 66 75 6e 63 |ta handl|ing func|
|000058a0| 74 69 6f 6e 61 6c 69 74 | 79 2e 0d 48 65 61 64 65 |tionalit|y..Heade|
|000058b0| 72 20 46 69 6c 65 0d 46 | 57 53 74 72 54 6f 6f 2e |r File.F|WStrToo.|
|000058c0| 68 0d 48 65 72 69 74 61 | 67 65 0d 46 57 5f 43 53 |h.Herita|ge.FW_CS|
|000058d0| 74 72 69 6e 67 54 6f 6f | 6c 09 34 31 0d a5 46 57 |tringToo|l.41..FW|
|000058e0| 5f 4d 69 6e 69 6d 61 6c | 53 74 72 69 6e 67 54 6f |_Minimal|StringTo|
|000058f0| 6f 6c 0d 55 73 69 6e 67 | 20 54 68 69 73 20 43 6c |ol.Using| This Cl|
|00005900| 61 73 73 0d 46 57 5f 43 | 4d 69 6e 69 6d 61 6c 53 |ass.FW_C|MinimalS|
|00005910| 74 72 69 6e 67 54 6f 6f | 6c 20 70 65 72 66 6f 72 |tringToo|l perfor|
|00005920| 6d 73 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 6f 6e |ms opera|tions on|
|00005930| 20 74 65 78 74 20 64 61 | 74 61 20 77 69 74 68 6f | text da|ta witho|
|00005940| 75 74 20 61 6e 79 20 6b | 6e 6f 77 6c 65 64 67 65 |ut any k|nowledge|
|00005950| 20 6f 66 20 6c 61 6e 67 | 75 61 67 65 2c 20 6c 6f | of lang|uage, lo|
|00005960| 63 61 6c 65 2c 20 63 68 | 61 72 61 63 74 65 72 20 |cale, ch|aracter |
|00005970| 73 65 74 2c 20 6f 72 20 | 63 61 73 65 20 73 65 6e |set, or |case sen|
|00005980| 73 69 74 69 76 69 74 79 | 2e 20 54 68 69 73 20 63 |sitivity|. This c|
|00005990| 6c 61 73 73 20 69 73 20 | 70 72 6f 76 69 64 65 64 |lass is |provided|
|000059a0| 20 66 6f 72 20 71 75 69 | 63 6b 20 75 73 65 20 69 | for qui|ck use i|
|000059b0| 6e 20 73 69 6d 70 6c 65 | 20 70 72 6f 63 65 73 73 |n simple| process|
|000059c0| 69 6e 67 20 73 69 74 75 | 61 74 69 6f 6e 73 20 77 |ing situ|ations w|
|000059d0| 68 65 72 65 20 63 6f 6d | 70 6c 65 74 65 20 6b 6e |here com|plete kn|
|000059e0| 6f 77 6c 65 64 67 65 20 | 6f 66 20 63 68 61 72 61 |owledge |of chara|
|000059f0| 63 74 65 72 20 70 61 72 | 61 6d 65 74 65 72 73 20 |cter par|ameters |
|00005a00| 61 6e 64 20 66 6f 72 6d | 61 74 20 69 73 20 6e 6f |and form|at is no|
|00005a10| 74 20 72 65 71 75 69 72 | 65 64 2e 0d 55 73 65 20 |t requir|ed..Use |
|00005a20| 74 68 69 73 20 63 6c 61 | 73 73 20 74 6f 20 73 65 |this cla|ss to se|
|00005a30| 61 72 63 68 20 61 6e 64 | 20 63 6f 6d 70 61 72 65 |arch and| compare|
|00005a40| 20 64 61 74 61 20 69 6e | 20 61 6e 79 20 74 65 78 | data in| any tex|
|00005a50| 74 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |t data s|tructure|
|00005a60| 20 66 6f 72 20 77 68 69 | 63 68 20 74 65 78 74 20 | for whi|ch text |
|00005a70| 69 74 65 72 61 74 6f 72 | 73 20 28 72 65 61 64 65 |iterator|s (reade|
|00005a80| 72 73 2c 20 77 72 69 74 | 65 72 73 2c 20 61 6e 64 |rs, writ|ers, and|
|00005a90| 20 66 69 6c 74 65 72 73 | 29 20 68 61 76 65 20 62 | filters|) have b|
|00005aa0| 65 65 6e 20 63 72 65 61 | 74 65 64 2e 0d 4d 6f 73 |een crea|ted..Mos|
|00005ab0| 74 20 70 61 72 74 73 20 | 77 69 6c 6c 20 6e 65 65 |t parts |will nee|
|00005ac0| 64 20 74 6f 20 75 73 65 | 20 6d 6f 72 65 20 73 6f |d to use| more so|
|00005ad0| 70 68 69 73 74 69 63 61 | 74 65 64 20 73 74 72 69 |phistica|ted stri|
|00005ae0| 6e 67 20 74 6f 6f 6c 73 | 2c 20 70 72 6f 76 69 64 |ng tools|, provid|
|00005af0| 65 64 20 69 6e 20 6f 74 | 68 65 72 20 53 74 72 69 |ed in ot|her Stri|
|00005b00| 6e 67 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2e 0d 52 |ng compo|nents..R|
|00005b10| 65 6c 61 74 65 64 20 43 | 6c 61 73 73 65 73 0d 46 |elated C|lasses.F|
|00005b20| 57 5f 43 54 65 78 74 52 | 65 61 64 65 72 2c 20 46 |W_CTextR|eader, F|
|00005b30| 57 5f 54 65 78 74 57 72 | 69 74 65 72 20 61 6e 64 |W_TextWr|iter and|
|00005b40| 20 46 57 5f 43 53 74 72 | 69 6e 67 20 75 73 65 20 | FW_CStr|ing use |
|00005b50| 46 57 5f 43 4d 69 6e 69 | 6d 61 6c 53 74 72 69 6e |FW_CMini|malStrin|
|00005b60| 67 54 6f 6f 6c 20 6d 65 | 74 68 6f 64 73 20 74 6f |gTool me|thods to|
|00005b70| 20 73 6f 72 74 2c 20 73 | 65 61 72 63 68 20 61 6e | sort, s|earch an|
|00005b80| 64 20 63 6f 6d 70 61 72 | 65 20 73 74 72 69 6e 67 |d compar|e string|
|00005b90| 73 2e 0d 53 75 62 63 6c | 61 73 73 69 6e 67 20 74 |s..Subcl|assing t|
|00005ba0| 68 65 20 46 57 5f 43 4d | 69 6e 69 6d 61 6c 53 74 |he FW_CM|inimalSt|
|00005bb0| 72 69 6e 67 54 6f 6f 6c | 20 43 6c 61 73 73 0d 53 |ringTool| Class.S|
|00005bc0| 75 62 63 6c 61 73 73 20 | 46 57 5f 43 4d 69 6e 69 |ubclass |FW_CMini|
|00005bd0| 6d 61 6c 53 74 72 69 6e | 67 54 6f 6f 6c 20 74 6f |malStrin|gTool to|
|00005be0| 20 63 68 61 6e 67 65 20 | 63 68 61 72 61 63 74 65 | change |characte|
|00005bf0| 72 20 63 6f 6e 76 65 72 | 73 69 6f 6e 20 73 65 6d |r conver|sion sem|
|00005c00| 61 6e 74 69 63 73 2e 2e | 0d 4f 76 65 72 72 69 64 |antics..|.Overrid|
|00005c10| 69 6e 67 20 46 57 5f 43 | 4d 69 6e 69 6d 61 6c 53 |ing FW_C|MinimalS|
|00005c20| 74 72 69 6e 67 54 6f 6f | 6c 20 4d 65 74 68 6f 64 |tringToo|l Method|
|00005c30| 73 0d 59 6f 75 20 6d 75 | 73 74 20 6f 76 65 72 72 |s.You mu|st overr|
|00005c40| 69 64 65 20 61 6c 6c 20 | 76 69 72 74 75 61 6c 20 |ide all |virtual |
|00005c50| 6d 65 74 68 6f 64 73 20 | 6f 66 20 74 68 69 73 20 |methods |of this |
|00005c60| 63 6c 61 73 73 20 62 65 | 66 6f 72 65 20 73 75 62 |class be|fore sub|
|00005c70| 63 6c 61 73 73 69 6e 67 | 20 69 74 2e 20 41 6c 6c |classing| it. All|
|00005c80| 20 76 69 72 74 75 61 6c | 20 6d 65 74 68 6f 64 73 | virtual| methods|
|00005c90| 20 61 72 65 20 70 72 6f | 74 65 63 74 65 64 2e 20 | are pro|tected. |
|00005ca0| 53 65 65 20 74 68 65 20 | 4d 65 74 68 6f 64 73 20 |See the |Methods |
|00005cb0| 73 65 63 74 69 6f 6e 20 | 74 6f 20 69 64 65 6e 74 |section |to ident|
|00005cc0| 69 66 79 20 76 69 72 74 | 75 61 6c 20 6d 65 74 68 |ify virt|ual meth|
|00005cd0| 6f 64 73 2e 0d 46 57 5f | 43 4d 69 6e 69 6d 61 6c |ods..FW_|CMinimal|
|00005ce0| 53 74 72 69 6e 67 54 6f | 6f 6c 20 4d 65 74 68 6f |StringTo|ol Metho|
|00005cf0| 64 73 0d 0d 46 57 5f 43 | 4d 69 6e 69 6d 61 6c 53 |ds..FW_C|MinimalS|
|00005d00| 74 72 69 6e 67 54 6f 6f | 6c 28 0d 09 09 09 09 09 |tringToo|l(......|
|00005d10| 09 46 57 5f 42 6f 6f 6c | 65 61 6e 20 63 61 73 65 |.FW_Bool|ean case|
|00005d20| 53 65 6e 73 69 74 69 76 | 65 3d 54 52 55 45 29 3b |Sensitiv|e=TRUE);|
|00005d30| 0d 0d 44 65 66 61 75 6c | 74 20 63 6f 6e 73 74 72 |..Defaul|t constr|
|00005d40| 75 63 74 6f 72 2e 0d 0d | 76 69 72 74 75 61 6c 20 |uctor...|virtual |
|00005d50| 7e 46 57 5f 43 4d 69 6e | 69 6d 61 6c 53 74 72 69 |~FW_CMin|imalStri|
|00005d60| 6e 67 54 6f 6f 6c 28 29 | 3b 0d 0d 43 6c 61 73 73 |ngTool()|;..Class|
|00005d70| 20 64 65 73 74 72 75 63 | 74 6f 72 2e 0d 0d 76 69 | destruc|tor...vi|
|00005d80| 72 74 75 61 6c 20 46 57 | 5f 53 74 72 69 6e 67 43 |rtual FW|_StringC|
|00005d90| 6f 6d 70 61 72 65 52 65 | 73 75 6c 74 20 44 6f 43 |ompareRe|sult DoC|
|00005da0| 6f 6d 70 61 72 65 53 74 | 72 69 6e 67 73 28 0d 09 |ompareSt|rings(..|
|00005db0| 09 09 09 09 09 09 09 46 | 57 5f 43 54 65 78 74 52 |.......F|W_CTextR|
|00005dc0| 65 61 64 65 72 20 26 72 | 65 61 64 65 72 31 2c 20 |eader &r|eader1, |
|00005dd0| 0d 09 09 09 09 09 09 09 | 09 46 57 5f 43 54 65 78 |........|.FW_CTex|
|00005de0| 74 52 65 61 64 65 72 20 | 26 72 65 61 64 65 72 32 |tReader |&reader2|
|00005df0| 29 3b 0d 0d 43 6f 6d 70 | 61 72 65 73 20 74 77 6f |);..Comp|ares two|
|00005e00| 20 74 65 78 74 20 73 74 | 72 69 6e 67 73 3b 20 72 | text st|rings; r|
|00005e10| 65 61 64 65 72 31 20 61 | 6e 64 20 72 65 61 64 65 |eader1 a|nd reade|
|00005e20| 72 32 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 61 |r2 and r|eturns a|
|00005e30| 6e 20 65 6e 75 6d 20 76 | 61 6c 75 65 20 69 6e 64 |n enum v|alue ind|
|00005e40| 69 63 61 74 69 6e 67 20 | 77 68 65 74 68 65 72 20 |icating |whether |
|00005e50| 73 74 72 69 6e 67 20 74 | 77 6f 20 77 61 73 20 6c |string t|wo was l|
|00005e60| 6f 6e 67 65 72 2c 20 65 | 71 75 61 6c 20 6f 72 20 |onger, e|qual or |
|00005e70| 73 68 6f 72 74 65 72 20 | 74 68 61 6e 20 73 74 72 |shorter |than str|
|00005e80| 69 6e 67 20 6f 6e 65 2e | 20 54 68 69 73 20 69 73 |ing one.| This is|
|00005e90| 20 61 20 70 72 6f 74 65 | 63 74 65 64 20 6d 65 74 | a prote|cted met|
|00005ea0| 68 6f 64 2e 20 0d 0d 76 | 69 72 74 75 61 6c 20 46 |hod. ..v|irtual F|
|00005eb0| 57 5f 42 6f 6f 6c 65 61 | 6e 20 44 6f 4d 61 74 63 |W_Boolea|n DoMatc|
|00005ec0| 68 50 72 65 66 69 78 53 | 74 72 69 6e 67 28 0d 09 |hPrefixS|tring(..|
|00005ed0| 09 09 09 09 09 09 09 46 | 57 5f 43 54 65 78 74 52 |.......F|W_CTextR|
|00005ee0| 65 61 64 65 72 20 26 74 | 61 72 67 65 74 2c 0d 09 |eader &t|arget,..|
|00005ef0| 09 09 09 09 09 09 09 46 | 57 5f 43 54 65 78 74 52 |.......F|W_CTextR|
|00005f00| 65 61 64 65 72 20 26 70 | 72 65 66 69 78 29 3b 0d |eader &p|refix);.|
|00005f10| 0d 43 6f 6d 70 61 72 65 | 73 20 26 70 72 65 66 69 |.Compare|s &prefi|
|00005f20| 78 20 74 6f 20 26 74 61 | 72 67 65 74 20 61 74 20 |x to &ta|rget at |
|00005f30| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 68 61 72 |the curr|ent char|
|00005f40| 61 63 74 65 72 20 70 6f | 73 69 74 69 6f 6e 2c 20 |acter po|sition, |
|00005f50| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 54 52 55 45 |and retu|rns TRUE|
|00005f60| 20 69 66 20 74 68 65 20 | 63 68 61 72 61 63 74 65 | if the |characte|
|00005f70| 72 73 20 6d 61 74 63 68 | 2e 20 54 68 69 73 20 69 |rs match|. This i|
|00005f80| 73 20 61 20 70 72 6f 74 | 65 63 74 65 64 20 6d 65 |s a prot|ected me|
|00005f90| 74 68 6f 64 2e 0d 0d 76 | 69 72 74 75 61 6c 20 46 |thod...v|irtual F|
|00005fa0| 57 5f 42 6f 6f 6c 65 61 | 6e 20 44 6f 46 69 6e 64 |W_Boolea|n DoFind|
|00005fb0| 53 75 62 53 74 72 69 6e | 67 28 0d 09 09 09 09 46 |SubStrin|g(.....F|
|00005fc0| 57 5f 43 54 65 78 74 52 | 65 61 64 65 72 20 26 73 |W_CTextR|eader &s|
|00005fd0| 65 61 72 63 68 53 74 72 | 69 6e 67 52 65 61 64 65 |earchStr|ingReade|
|00005fe0| 72 2c 0d 09 09 09 09 46 | 57 5f 43 54 65 78 74 52 |r,.....F|W_CTextR|
|00005ff0| 65 61 64 65 72 20 26 73 | 75 62 53 74 72 69 6e 67 |eader &s|ubString|
|00006000| 52 65 61 64 65 72 2c 0d | 09 09 09 09 46 57 5f 43 |Reader,.|....FW_C|
|00006010| 68 61 72 61 63 74 65 72 | 50 6f 73 69 74 69 6f 6e |haracter|Position|
|00006020| 20 26 66 6f 75 6e 64 50 | 6f 73 69 74 69 6f 6e 29 | &foundP|osition)|
|00006030| 3b 0d 0d 52 65 74 75 72 | 6e 73 20 74 68 65 20 63 |;..Retur|ns the c|
|00006040| 68 61 72 61 63 74 65 72 | 20 70 6f 73 69 74 69 6f |haracter| positio|
|00006050| 6e 20 6f 66 20 74 68 65 | 20 66 69 72 73 74 20 70 |n of the| first p|
|00006060| 6f 73 69 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 73 |osition |of the s|
|00006070| 75 62 73 74 72 69 6e 67 | 2e 20 54 68 69 73 20 69 |ubstring|. This i|
|00006080| 73 20 61 20 70 72 6f 74 | 65 63 74 65 64 20 6d 65 |s a prot|ected me|
|00006090| 74 68 6f 64 2e 0d 0d 0d | 76 69 72 74 75 61 6c 20 |thod....|virtual |
|000060a0| 46 57 5f 42 6f 6f 6c 65 | 61 6e 20 44 6f 46 69 6e |FW_Boole|an DoFin|
|000060b0| 64 43 68 61 72 61 63 74 | 65 72 28 0d 09 09 46 57 |dCharact|er(...FW|
|000060c0| 5f 43 54 65 78 74 52 65 | 61 64 65 72 20 26 72 65 |_CTextRe|ader &re|
|000060d0| 61 64 65 72 2c 0d 09 09 | 46 57 5f 43 68 61 72 20 |ader,...|FW_Char |
|000060e0| 63 68 61 72 61 63 74 65 | 72 2c 20 0d 09 09 46 57 |characte|r, ...FW|
|000060f0| 5f 43 68 61 72 61 63 74 | 65 72 50 6f 73 69 74 69 |_Charact|erPositi|
|00006100| 6f 6e 20 26 66 6f 75 6e | 64 50 6f 73 69 74 69 6f |on &foun|dPositio|
|00006110| 6e 2c 0d 09 09 46 57 5f | 46 69 6e 64 44 69 72 65 |n,...FW_|FindDire|
|00006120| 63 74 69 6f 6e 20 64 69 | 72 65 63 74 69 6f 6e 3d |ction di|rection=|
|00006130| 46 57 5f 6b 46 6f 72 77 | 61 72 64 73 29 3b 0d 0d |FW_kForw|ards);..|
|00006140| 53 65 61 72 63 68 65 73 | 20 61 20 74 65 78 74 20 |Searches| a text |
|00006150| 73 74 72 69 6e 67 20 66 | 6f 72 20 61 20 67 69 76 |string f|or a giv|
|00006160| 65 6e 20 63 68 61 72 61 | 63 74 65 72 2e 20 49 74 |en chara|cter. It|
|00006170| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 63 68 61 | returns| the cha|
|00006180| 72 61 63 74 65 72 20 70 | 6f 73 69 74 69 6f 6e 20 |racter p|osition |
|00006190| 6f 66 20 74 68 61 74 20 | 63 68 61 72 61 63 74 65 |of that |characte|
|000061a0| 72 20 69 66 20 66 6f 75 | 6e 64 2e 20 54 68 69 73 |r if fou|nd. This|
|000061b0| 20 69 73 20 61 20 70 72 | 6f 74 65 63 74 65 64 20 | is a pr|otected |
|000061c0| 6d 65 74 68 6f 64 2e 0d | 0d 76 69 72 74 75 61 6c |method..|.virtual|
|000061d0| 20 46 57 5f 42 6f 6f 6c | 65 61 6e 20 44 6f 46 69 | FW_Bool|ean DoFi|
|000061e0| 6e 64 57 68 69 74 65 53 | 70 61 63 65 28 0d 09 09 |ndWhiteS|pace(...|
|000061f0| 46 57 5f 43 54 65 78 74 | 52 65 61 64 65 72 20 26 |FW_CText|Reader &|
|00006200| 72 65 61 64 65 72 2c 0d | 09 09 46 57 5f 43 68 61 |reader,.|..FW_Cha|
|00006210| 72 61 63 74 65 72 50 6f | 73 69 74 69 6f 6e 20 26 |racterPo|sition &|
|00006220| 66 6f 75 6e 64 50 6f 73 | 69 74 69 6f 6e 2c 0d 09 |foundPos|ition,..|
|00006230| 09 46 57 5f 46 69 6e 64 | 44 69 72 65 63 74 69 6f |.FW_Find|Directio|
|00006240| 6e 20 64 69 72 65 63 74 | 69 6f 6e 3d 46 57 5f 6b |n direct|ion=FW_k|
|00006250| 46 6f 72 77 61 72 64 73 | 29 3b 0d 0d 53 65 61 72 |Forwards|);..Sear|
|00006260| 63 68 65 73 20 61 20 74 | 65 78 74 20 73 74 72 69 |ches a t|ext stri|
|00006270| 6e 67 20 66 6f 72 20 61 | 20 77 68 69 74 65 73 70 |ng for a| whitesp|
|00006280| 61 63 65 20 63 68 61 72 | 61 63 74 65 72 2e 20 49 |ace char|acter. I|
|00006290| 74 20 72 65 74 75 72 6e | 73 20 74 68 65 20 63 68 |t return|s the ch|
|000062a0| 61 72 61 63 74 65 72 20 | 70 6f 73 69 74 69 6f 6e |aracter |position|
|000062b0| 20 6f 66 20 74 68 61 74 | 20 63 68 61 72 61 63 74 | of that| charact|
|000062c0| 65 72 20 69 66 20 66 6f | 75 6e 64 2e 20 54 68 69 |er if fo|und. Thi|
|000062d0| 73 20 69 73 20 61 20 70 | 72 6f 74 65 63 74 65 64 |s is a p|rotected|
|000062e0| 20 6d 65 74 68 6f 64 2e | 0d 0d 76 69 72 74 75 61 | method.|..virtua|
|000062f0| 6c 20 46 57 5f 42 6f 6f | 6c 65 61 6e 20 44 6f 46 |l FW_Boo|lean DoF|
|00006300| 69 6e 64 4e 6f 6e 57 68 | 69 74 65 53 70 61 63 65 |indNonWh|iteSpace|
|00006310| 28 0d 09 09 09 46 57 5f | 43 54 65 78 74 52 65 61 |(....FW_|CTextRea|
|00006320| 64 65 72 20 26 72 65 61 | 64 65 72 2c 20 0d 09 09 |der &rea|der, ...|
|00006330| 09 46 57 5f 43 68 61 72 | 61 63 74 65 72 50 6f 73 |.FW_Char|acterPos|
|00006340| 69 74 69 6f 6e 20 26 66 | 6f 75 6e 64 50 6f 73 69 |ition &f|oundPosi|
|00006350| 74 69 6f 6e 2c 0d 09 09 | 09 46 69 6e 64 44 69 72 |tion,...|.FindDir|
|00006360| 65 63 74 69 6f 6e 20 64 | 69 72 65 63 74 69 6f 6e |ection d|irection|
|00006370| 3d 46 57 5f 6b 46 6f 72 | 77 61 72 64 73 29 3b 0d |=FW_kFor|wards);.|
|00006380| 0d 53 65 61 72 63 68 65 | 73 20 61 20 46 57 5f 43 |.Searche|s a FW_C|
|00006390| 54 65 78 74 52 65 61 64 | 65 72 20 73 74 72 69 6e |TextRead|er strin|
|000063a0| 67 20 66 6f 72 20 61 20 | 6e 6f 6e 2d 77 68 69 74 |g for a |non-whit|
|000063b0| 65 73 70 61 63 65 20 63 | 68 61 72 61 63 74 65 72 |espace c|haracter|
|000063c0| 2e 20 49 74 20 72 65 74 | 75 72 6e 73 20 54 52 55 |. It ret|urns TRU|
|000063d0| 45 2c 20 74 6f 67 65 74 | 68 65 72 20 77 69 74 68 |E, toget|her with|
|000063e0| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 70 | the cha|racter p|
|000063f0| 6f 73 69 74 69 6f 6e 20 | 6f 66 20 74 68 61 74 20 |osition |of that |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.